code: def main(_):
      if not FLAGS.dump_dir:
          print("ERROR: dump_dir flag is empty.", file=sys.stderr)
          sys.exit(1)
  
      print("tfdbg offline: FLAGS.dump_dir = %s" % FLAGS.dump_dir)
  
      debug_dump = debug_data.DebugDumpDir(
          FLAGS.dump_dir, validate=FLAGS.validate_graph
      )
      cli = analyzer_cli.create_analyzer_ui(
          debug_dump,
          tensor_filters={"has_inf_or_nan": debug_data.has_inf_or_nan},
          ui_type=FLAGS.ui_type,
      )
  
      title = "tfdbg offline @ %s" % FLAGS.dump_dir
      cli.run_ui(
          title=title, title_color="black_on_white", init_command="lt"
      )
  
imports: import argparse
  import sys
  from absl import app
  from tensorflow.python.debug.cli import analyzer_cli
  from tensorflow.python.debug.lib import debug_data
label_desc: Use image node_id 1 for calling a global function with example usage: main(_) without return types