code: def needs_local_scope(func):
      """Decorator to mark magic functions which need to local scope to run."""
      func.needs_local_scope = True
      return func
  
imports: import os
  import re
  import sys
  from getopt import getopt, GetoptError
  from traitlets.config.configurable import Configurable
  from .None import oinspect
  from .error import UsageError
  from .inputtransformer2 import ESC_MAGIC, ESC_MAGIC2
  from ..utils.ipstruct import Struct
  from ..utils.process import arg_split
  from ..utils.text import dedent
  from traitlets import Bool, Dict, Instance, observe
  from logging import error
label_desc: Use image node_id 3 for calling a global function with example usage: needs_local_scope(func) and returns: func