code: def generate_chunked_model(non_chunked_dir: str, chunked_dir: str):
      saved_model = loader_impl.parse_saved_model(non_chunked_dir)
      prefix = file_io.join(compat.as_str(chunked_dir), "saved_model")
      file_io.write_string_to_file(f"{prefix}.pbtxt", str(saved_model))
      proto_splitter.SavedModelSplitter(saved_model).write(prefix)
  
file_path: tensorflow-upstream/tensorflow/cc/saved_model/testdata/generate_chunked_models.py
imports: from collections.abc import Sequence
  import os
  from absl import app
  from absl import flags
  import numpy
  from tensorflow.python.compat import v2_compat
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.module import module
  from tensorflow.python.saved_model import loader_impl
  from tensorflow.python.saved_model import save
  from tensorflow.python.saved_model import save_options
  from tensorflow.python.util import compat
  from tensorflow.tools.proto_splitter import constants
  from tensorflow.tools.proto_splitter.python import saved_model
label_desc: Use image node_id 2 for calling a global function with example usage: generate_chunked_model(non_chunked_dir, chunked_dir) without return types