def constant_value_as_shape(tensor):  # pylint: disable=invalid-name
  """
  """
  shape = tf.get_static_value(tensor)
  if shape is not None:
    return [None if dim == -1 else dim for dim in shape]
  return tensor_util.constant_value_as_shape(tensor)