code: def run(self, globs=None):
          
          # Without this, the underneath import clashes with the top-level one
          global scoop
  
          if globs is None:
              globs = globals()
  
          # import the user module
          if scoop.MAIN_MODULE:
              globs.update(self.setupEnvironment(self))
  
          # Start the user program
          from scoop import futures
  
          def futures_startup():
              """Execute the user code.
              Wraps futures._startup (SCOOP initialisation) over the user module.
              Needs """
              return futures._startup(
                  functools.partial(
                      runpy.run_path,
                      scoop.MAIN_MODULE,
                      init_globals=globs,
                      run_name="__main__"
                  )
              )
  
          if self.args.profile:
              import cProfile
              # runctx instead of run is required for local function
              try:
                  os.makedirs("profile")
              except:
                  pass
              cProfile.runctx(
                  "futures_startup()",
                  globs,
                  locals(),
                  "./profile/{0}.prof".format(os.getpid())
              )
          else:
              try:
                  futures_startup()
              finally:
                  # Must reimport (potentially not there after bootstrap)
                  import scoop
  
                  # Ensure a communication queue exists (may happend when a
                  # connection wasn't established such as cloud-mode wait).
                  if scoop._control.execQueue:
                      scoop._control.execQueue.shutdown()
docs: Import user module and start __main__
             passing globals() is required when subclassing in another module