parameters: (rank)
return_statement: return _ShapeFunction
docstring: Returns a shape function for ops that constrain the rank of their input.
  
    Args:
      rank: An upper bound on the rank of the input and output.
  
    Returns:
      A shape function for ops that output a tensor of the same size as their
      input, with a particular rank.
docstring_summary: Returns a shape function for ops that constrain the rank of their input.
docstring_tokens: Returns a shape function for ops that constrain the rank of their input .
function: def unchanged_shape_with_rank_at_most(rank):
    """Returns a shape function for ops that constrain the rank of their input.
  
    Args:
      rank: An upper bound on the rank of the input and output.
  
    Returns:
      A shape function for ops that output a tensor of the same size as their
      input, with a particular rank.
    """
  
    def _ShapeFunction(op):
      return [op.inputs[0].get_shape().with_rank_at_most(rank)]
  
    return _ShapeFunction
function_tokens: def unchanged_shape_with_rank_at_most ( rank ) : def _ShapeFunction ( op ) : return [ op . inputs [ 0 ] . get_shape ( ) . with_rank_at_most ( rank ) ] return _ShapeFunction