parameters: (requestContext, seriesList, func='average', reverse=False)
return_statement: return seriesList
docstring: Takes one metric or a wildcard seriesList followed by an aggregation function and an
    optional ``reverse`` parameter.
  
    Returns the metrics sorted according to the specified function.
  
    Example:
  
    .. code-block:: none
  
      &target=sortBy(server*.instance*.threads.busy,'max')
  
    Draws the servers in ascending order by maximum.
docstring_summary: Takes one metric or a wildcard seriesList followed by an aggregation function and an
    optional ``reverse`` parameter.
docstring_tokens: Takes one metric or a wildcard seriesList followed by an aggregation function and an optional reverse parameter .
function: def sortBy(requestContext, seriesList, func='average', reverse=False):
    """
    Takes one metric or a wildcard seriesList followed by an aggregation function and an
    optional ``reverse`` parameter.
  
    Returns the metrics sorted according to the specified function.
  
    Example:
  
    .. code-block:: none
  
      &target=sortBy(server*.instance*.threads.busy,'max')
  
    Draws the servers in ascending order by maximum.
    """
    seriesList.sort(key=keyFunc(getAggFunc(func)), reverse=reverse)
    return seriesList
function_tokens: def sortBy ( requestContext , seriesList , func = 'average' , reverse = False ) : seriesList . sort ( key = keyFunc ( getAggFunc ( func ) ) , reverse = reverse ) return seriesList