code: def as_list(x):
      """Returns a `list` of integers or `None` for each dimension.
  
      For more details, see `help(tf.TensorShape.as_list)`.
  
      Args:
        x: object representing a shape; convertible to `tf.TensorShape`.
  
      Returns:
        shape_as_list: list of `int` or `None` values representing each dimensions
          size if known.
  
      Raises:
        ValueError: If `x` has unknown rank.
      """
      return tf.TensorShape(x).as_list()
  
file_path: probability/tensorflow_probability/python/internal/tensorshape_util.py
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
label_desc: Use image node_id 1 for calling a global function with example usage: as_list(x) and returns: tf