code: def shape_to_list(
      shape: Iterable[tf.Dimension],
  ) -> List[Union[int, None]]:
      """Convert a Tensorflow shape to a list of ints. Retained for backwards compatibility -- use TensorShape.as_list() in new code."""
      return [dim.value for dim in shape]
  
imports: import os
  import numpy
  import tensorflow
  import logging
  import tensorflow.contrib
  from typing import Any, Iterable, List, Union
label_desc: Use image node_id 3 for calling a global function with example usage: shape_to_list(shape) and returns: unknown