def aliasByNode(requestContext, seriesList, *nodes):
    """
    Takes a seriesList and applies an alias derived from one or more "node"
    portion/s of the target name. Node indices are 0 indexed.

    Example::

        &target=aliasByNode(ganglia.*.cpu.load5,1)

    """
    for series in seriesList:
        pathExpression = _getFirstPathExpression(series.name)
        metric_pieces = pathExpression.split('.')
        series.name = '.'.join(metric_pieces[n] for n in nodes)
    return seriesList

    Takes a seriesList and applies an alias derived from one or more "node"
    portion/s of the target name. Node indices are 0 indexed.

    Example::

        &target=aliasByNode(ganglia.*.cpu.load5,1)

    
graphite_api/functions.py