code: def _create_code(script_path: str):
      with open_python_file(script_path) as f:
          filebody = f.read()
  
      return compile(
          filebody,
          # Pass in the file path so it can show up in exceptions.
          script_path,
          # We're compiling entire blocks of Python, so we need "exec"
          # mode (as opposed to "eval" or "single").
          mode="exec",
          # Don't inherit any flags or "future" statements.
          flags=0,
          dont_inherit=1,
          # Use the default optimization options.
          optimize=-1,
      )
  
imports: import inspect
  import os
  import sys
  import traceback
  import types
  from contextlib import contextmanager
  from copy import copy
  from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type, Union
  from lightning.app.utilities.exceptions import MisconfigurationException
  from lightning.app.utilities.app_helpers import Logger, _mock_missing_imports
label_desc: Use image node_id 7 for calling a global function with example usage: _create_code(script_path) and returns: compile