code: def _profile_main():
      import cProfile
      import tempfile
  
      p = cProfile.Profile()
      sys.stderr.write("Profiling operation\n")
      p.enable()
      try:
          _main()
      finally:
          p.disable()
          _fd, tmp = tempfile.mkstemp(prefix="guild-op-profile-")
          sys.stderr.write(
              f"Writing guild.op_main profile stats to {tmp}\n"
          )
          p.dump_stats(tmp)
          sys.stderr.write(
              f"Use 'python -m pstats {tmp}' or 'snakeviz {tmp}' to view stats\n"
          )
  
imports: import warnings
  import logging
  import os
  import pdb
  import sys
  import traceback
  from guild import exit_code
  from guild import op_util
  from guild import util
label_desc: Use image node_id 2 for calling a global function with example usage: _profile_main() without return types