code: def _get_shape_as_list(tensor):
      """Replaces None with -1 in the tensor shape list representation."""
      shape = tensor.get_shape().as_list()
      for i, v in enumerate(shape):
          if v is None:
              shape[i] = -1
      return shape
  
imports: import collections
  import threading
  import typing
  from research.carls import dynamic_embedding_config_pb2
  from research.carls import dynamic_embedding_ops
  from six.moves import range
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: _get_shape_as_list(tensor) and returns: shape