code: def IPYTHON_MAIN():
      
      import pkg_resources
  
      runner_frame = inspect.getouterframes(inspect.currentframe())[-2]
      return (
          getattr(runner_frame, "function", None)
          == pkg_resources.load_entry_point("ipython", "console_scripts", "ipython").__name__
      )
docs: Decide if the Ipython command line is running code.