def bind(fn, name=None):
    'Directive to bind a free function to a class.\n\n            See online docs for more information.\n\n            .. note::\n               Functions bound using this directive must be re-inspected after\n               the class body execution has completed. This directive attaches\n               the external method into the class namespace and returns the\n               associated instance of the :class:`WrappedFunction`. However,\n               this instance may be further modified by other ReFrame builtins\n               such as :func:`run_before`, :func:`run_after`, :func:`final` and\n               so on after it was added to the namespace, which would bypass\n               the logic implemented in the :func:`__setitem__` method from the\n               :class:`MetaNamespace` class. Hence, we track the items set by\n               this directive in the ``_rfm_ext_bound`` set, so they can be\n               later re-inspected.\n            '
    inst = metacls.WrappedFunction(fn, name)
    namespace[inst.__name__] = inst
    namespace['_rfm_ext_bound'].add(inst.__name__)
    return inst
Directive to bind a free function to a class.

See online docs for more information.

.. note::
   Functions bound using this directive must be re-inspected after
   the class body execution has completed. This directive attaches
   the external method into the class namespace and returns the
   associated instance of the :class:`WrappedFunction`. However,
   this instance may be further modified by other ReFrame builtins
   such as :func:`run_before`, :func:`run_after`, :func:`final` and
   so on after it was added to the namespace, which would bypass
   the logic implemented in the :func:`__setitem__` method from the
   :class:`MetaNamespace` class. Hence, we track the items set by
   this directive in the ``_rfm_ext_bound`` set, so they can be
   later re-inspected.
def bind(fn, name=None):
    'Directive to bind a free function to a class.\n\n            See online docs for more information.\n\n            .. note::\n               Functions bound using this directive must be re-inspected after\n               the class body execution has completed. This directive attaches\n               the external method into the class namespace and returns the\n               associated instance of the :class:`WrappedFunction`. However,\n               this instance may be further modified by other ReFrame builtins\n               such as :func:`run_before`, :func:`run_after`, :func:`final` and\n               so on after it was added to the namespace, which would bypass\n               the logic implemented in the :func:`__setitem__` method from the\n               :class:`MetaNamespace` class. Hence, we track the items set by\n               this directive in the ``_rfm_ext_bound`` set, so they can be\n               later re-inspected.\n            '
    inst = metacls.WrappedFunction(fn, name)
    namespace[inst.__name__] = inst
    namespace['_rfm_ext_bound'].add(inst.__name__)
    return inst