@classmethod<EOL><INDENT>def auto(cls, func):<DEDENT>
@functools.wraps(func)<EOL>def auto_claim_handle(*args, **kwargs):<EOL><INDENT>with cls():<EOL><INDENT>return func(*args, **kwargs)<EOL><DEDENT><DEDENT>return auto_claim_handle<EOL>
The ``auto`` decorator wraps ``func`` in a context manager so that a handle is obtained.

.. note::
   Please note, that most functions require the handle to continue being alive for future calls to data
   retrieved from the function. In such cases, it's advisable to use the `requires_refcount` decorator, and
   force the program using the library with obtaining a handle (and keeping it active.)