# get_local_namespace function

(Shortest import: `from brian2 import get_local_namespace)`

brian2.core.namespace.get_local_namespace(level)

  Get the surrounding namespace.

  Parameters:

    level : int, optional

    > How far to go back to get the locals/globals. Each function/method call should add `1` to this argument, functions/method with a decorator have to add `2`.

  Returns:

    namespace : dict

    > The locals and globals at the given depth of the stack frame.