code: def main(argv: Sequence[str]) -> None:
      if len(argv) > 1:
          raise app.UsageError("Too many command-line arguments.")
  
      if "all" in EXPORT_FILES.value:
          export_files = ["pb", "pbtxt", "cpb"]
      else:
          export_files = EXPORT_FILES.value
  
      if "all" in GRAPH_TYPES.value:
          graph_types = VALID_GRAPH_TYPES.keys()
      else:
          graph_types = GRAPH_TYPES.value
  
      for v in graph_types:
          if v not in VALID_GRAPH_TYPES:
              raise ValueError(
                  f"Invalid flag passed to `graph_type`: {v}\nValid graph types:"
                  f" {ALL_GRAPH_TYPES}"
              )
  
          logging.info("Generating graph %s", v)
          f = VALID_GRAPH_TYPES[v]
          f(os.path.join(SPLITTER_TESTDATA_PATH.value, v), export_files)
  
file_path: tensorflow-upstream/tensorflow/tools/proto_splitter/testdata/split_graph_def_gen.py
imports: from collections.abc import Sequence
  import os
  from absl import app
  from absl import flags
  from absl import logging
  from tensorflow.core.framework import graph_pb2
  from tensorflow.python.lib.io import file_io
  from tensorflow.tools.proto_splitter import constants
  from tensorflow.tools.proto_splitter import split_graph_def
  from tensorflow.tools.proto_splitter.python import test_util
label_desc: Use image node_id 8 for calling a global function with example usage: main(argv) without return types