code: def get_shape_str(tensors):
      """
      Internally used by layer registry, to print shapes of inputs/outputs of layers.
  
      Args:
          tensors (list or tf.Tensor): a tensor or a list of tensors
      Returns:
          str: a string to describe the shape
      """
      if isinstance(tensors, (list, tuple)):
          for v in tensors:
              assert isinstance(
                  v, (tf.Tensor, tf.Variable)
              ), "Not a tensor: {}".format(type(v))
          shape_str = ", ".join(map(get_shape_str, tensors))
      else:
          assert isinstance(
              tensors, (tf.Tensor, tf.Variable)
          ), "Not a tensor: {}".format(type(tensors))
          shape_str = str(tensors.get_shape().as_list()).replace(
              "None", "?"
          )
      return shape_str
  
imports: from ..compat import tfv1
  from tabulate import tabulate
  from termcolor import colored
  from .common import get_op_tensor_name
  from ..utils import logger
label_desc: Use image node_id 2 for calling a global function with example usage: get_shape_str(tensors) and returns: shape_str