code: def make_shape(v, arg_name):
      """Convert v into a list."""
      # Args:
      #   v: A TensorShapeProto, a list of ints, or a tensor_shape.TensorShape.
      #   arg_name: String, for error messages.
  
      # Returns:
      #   None if the rank is unknown, otherwise a list of ints (or Nones in the
      #   position where the dimension is unknown).
      try:
          shape = tensor_shape.as_shape(v)
      except TypeError as e:
          raise TypeError(
              "Error converting %s to a TensorShape: %s."
              % (arg_name, e)
          )
      except ValueError as e:
          raise ValueError(
              "Error converting %s to a TensorShape: %s."
              % (arg_name, e)
          )
      if shape.ndims is None:
          return None
      else:
          return shape.as_list()
  
imports: from google.protobuf import text_format
  from tensorflow.core.framework import tensor_pb2
  from tensorflow.python import pywrap_tfe
  from tensorflow.python.eager import core
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_conversion_registry
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.types import core
  from tensorflow.python.util import compat
label_desc: Use image node_id 11 for calling a global function with example usage: make_shape(v, arg_name) and returns: None, shape