parameters: (tensor_list_list, shapes, enqueue_many)
return_statement: return shapes
docstring: Calculate and merge the shapes of incoming tensors.
  
    Args:
      tensor_list_list: List of tensor lists.
      shapes: List of shape tuples corresponding to tensors within the lists.
      enqueue_many: Boolean describing whether shapes will be enqueued as
        batches or individual entries.
  
    Returns:
      A list of shapes aggregating shape inference info from `tensor_list_list`,
      or returning `shapes` if it is not `None`.
  
    Raises:
      ValueError: If any of the inferred shapes in `tensor_list_list` lack a
        well defined rank.
docstring_summary: Calculate and merge the shapes of incoming tensors.
docstring_tokens: Calculate and merge the shapes of incoming tensors .
function: def _shapes(tensor_list_list, shapes, enqueue_many):
    """Calculate and merge the shapes of incoming tensors.
  
    Args:
      tensor_list_list: List of tensor lists.
      shapes: List of shape tuples corresponding to tensors within the lists.
      enqueue_many: Boolean describing whether shapes will be enqueued as
        batches or individual entries.
  
    Returns:
      A list of shapes aggregating shape inference info from `tensor_list_list`,
      or returning `shapes` if it is not `None`.
  
    Raises:
      ValueError: If any of the inferred shapes in `tensor_list_list` lack a
        well defined rank.
    """
    if shapes is None:
      len0 = len(tensor_list_list[0])
  
      for tl in tensor_list_list:
        for i in range(len0):
          if tl[i].shape.ndims is None:
            raise ValueError("Cannot infer Tensor's rank: %s" % tl[i])
  
      shapes = [
          _merge_shapes([tl[i].shape.as_list()
                         for tl in tensor_list_list], enqueue_many)
          for i in range(len0)
      ]
    return shapes
function_tokens: def _shapes ( tensor_list_list , shapes , enqueue_many ) : if shapes is None : len0 = len ( tensor_list_list [ 0 ] ) for tl in tensor_list_list : for i in range ( len0 ) : if tl [ i ] . shape . ndims is None : raise ValueError ( "Cannot infer Tensor's rank: %s" % tl [ i ] ) shapes = [ _merge_shapes ( [ tl [ i ] . shape . as_list ( ) for tl in tensor_list_list ] , enqueue_many ) for i in range ( len0 ) ] return shapes