using_cluster
A decorator that wraps a function to automatically resolve and inject a cluster instance into the function's arguments based on the provided positional arguments.
def using_cluster(
fun: function
) - > function
A decorator that resolves a cluster object from positional arguments before executing the wrapped method.
Parameters
| Name | Type | Description |
|---|---|---|
| fun | function | The method to be wrapped, which expects a cluster object as its first argument after 'self'. |
Returns
| Type | Description |
|---|---|
function | A wrapped version of the function that automatically injects the resolved cluster object as the first positional argument. |