parameters: (shape, min_rank=1)
return_statement: return value
docstring: Returns the last dimension of shape while checking it has min_rank.
  
    Args:
      shape: A `TensorShape`.
      min_rank: Integer, minimum rank of shape.
  
    Returns:
      The value of the last dimension.
  
    Raises:
      ValueError: if inputs don't have at least min_rank dimensions, or if the
        last dimension value is not defined.
docstring_summary: Returns the last dimension of shape while checking it has min_rank.
docstring_tokens: Returns the last dimension of shape while checking it has min_rank .
function: def last_dimension(shape, min_rank=1):
    """Returns the last dimension of shape while checking it has min_rank.
  
    Args:
      shape: A `TensorShape`.
      min_rank: Integer, minimum rank of shape.
  
    Returns:
      The value of the last dimension.
  
    Raises:
      ValueError: if inputs don't have at least min_rank dimensions, or if the
        last dimension value is not defined.
    """
    dims = shape.dims
    if dims is None:
      raise ValueError('dims of shape must be known but is None')
    if len(dims) < min_rank:
      raise ValueError('rank of shape must be at least %d not: %d' % (min_rank,
                                                                      len(dims)))
    value = dims[-1].value
    if value is None:
      raise ValueError('last dimension shape must be known but is None')
    return value
function_tokens: def last_dimension ( shape , min_rank = 1 ) : dims = shape . dims if dims is None : raise ValueError ( 'dims of shape must be known but is None' ) if len ( dims ) < min_rank : raise ValueError ( 'rank of shape must be at least %d not: %d' % ( min_rank , len ( dims ) ) ) value = dims [ - 1 ] . value if value is None : raise ValueError ( 'last dimension shape must be known but is None' ) return value