code: def type_to_pack_format(typestring):
      fmt = None
      if typestring == "bool":
          fmt = "B"
      elif typestring == "double" or typestring == "float":
          fmt = "f"
      elif typestring == "int64":
          fmt = "i"
      elif typestring == "repeated int64" or typestring == "Shape":
          fmt = "iI"
      elif typestring == "repeated float":
          fmt = "fF"
      elif typestring == "string":
          fmt = "i"
      elif typestring == "Communicator":
          fmt = "C"
      else:
          raise ValueError("{} is not defined.".format(typestring))
      return fmt
  
file_path: nnabla/build-tools/code_generator/generate.py
imports: import sys
  from collections import OrderedDict
  from os.path import abspath, dirname, join, exists
  from contextlib import contextmanager
  import code_generator_utils
label_desc: Use image node_id 1 for calling a global function with example usage: type_to_pack_format(typestring) and returns: fmt