def add_dynamic_implementation(self, target, code, namespace=None, dependencies=None, availability_check=None, name=None, compiler_kwds=None):
    '\n        Adds an "dynamic implementation" for this function. `code` and `namespace`\n        arguments are expected to be callables that will be called in\n        `Network.before_run` with the owner of the `CodeObject` as an argument.\n        This allows to generate code that depends on details of the context it\n        is run in, e.g. the ``dt`` of a clock.\n        '
    if (not callable(code)):
        raise TypeError(('code argument has to be a callable, is type %s instead' % type(code)))
    if ((namespace is not None) and (not callable(namespace))):
        raise TypeError(('namespace argument has to be a callable, is type %s instead' % type(code)))
    self._implementations[target] = FunctionImplementation(name=name, code=code, namespace=namespace, dependencies=dependencies, availability_check=availability_check, dynamic=True, compiler_kwds=compiler_kwds)
Adds an "dynamic implementation" for this function. `code` and `namespace`
arguments are expected to be callables that will be called in
`Network.before_run` with the owner of the `CodeObject` as an argument.
This allows to generate code that depends on details of the context it
is run in, e.g. the ``dt`` of a clock.
def add_dynamic_implementation(self, target, code, namespace=None, dependencies=None, availability_check=None, name=None, compiler_kwds=None):
    '\n        Adds an "dynamic implementation" for this function. `code` and `namespace`\n        arguments are expected to be callables that will be called in\n        `Network.before_run` with the owner of the `CodeObject` as an argument.\n        This allows to generate code that depends on details of the context it\n        is run in, e.g. the ``dt`` of a clock.\n        '
    if (not callable(code)):
        raise TypeError(('code argument has to be a callable, is type %s instead' % type(code)))
    if ((namespace is not None) and (not callable(namespace))):
        raise TypeError(('namespace argument has to be a callable, is type %s instead' % type(code)))
    self._implementations[target] = FunctionImplementation(name=name, code=code, namespace=namespace, dependencies=dependencies, availability_check=availability_check, dynamic=True, compiler_kwds=compiler_kwds)