def getReducerName(reducer):
    """
    Get the name of the parsed reducer.

    WARNING: This function makes a request to EE Servers (getInfo). Do not use
    in server side functions (example: inside a mapping function)
    """
    reducer_type = reducer.getInfo()['type']
    relations = dict(mean=['Reducer.mean', 'Reducer.intervalMean'], median=
        ['Reducer.median'], mode=['Reducer.mode'], first=['Reducer.first',
        'Reducer.firstNonNull'], last=['Reducer.last',
        'Reducer.lastNonNull'], stdDev=['Reducer.stdDev',
        'Reducer.sampleStdDev'], all=['Reducer.allNoneZero'], any=[
        'Reducer.anyNoneZero'], count=['Reducer.count',
        'Reducer.countDistinct'], max=['Reducer.max'], min=['Reducer.min'],
        product=['Reducer.product'], variance=['Reducer.sampleVariance',
        'Reducer.variance'], skew=['Reducer.skew'], sum=['Reducer.sum'])
    for name, options in relations.items():
        if reducer_type in options:
            return name
