code: def resetLocalNames(g=None):
      
      if g is None:
          g = inspect.stack(0)[1][0].f_locals  #  get globals of calling scope
      for k in list(graphBase.LocalNames.keys()):
          try:
              g.pop(k)
          except KeyError:
              raise KeyError('%s not in globals, are you calling resetLocalNames from a local scope?' % k)
          graphBase.LocalNames.pop(k)
docs: WARNING: Only call from top level! THIS DOES NOT RESET NAMES in an embeded IPython!!!
          Remove any local names that have already been defined.