code: def shape(tensor):
      if isinstance(tensor, tf.SparseTensor):
          return tensor.dense_shape
      else:
          return tf.shape(input=tensor, out_type=tf.int64)
  
file_path: agents/tf_agents/utils/composite.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: shape(tensor) and returns: tensor, tf