def find(fn, record):
    """Apply a function on the record and return the corresponding new record

    :param fn: a function
    :param record: a dictionary
    :returns: a dictionary

    >>> find(max, {'Terry': 30, 'Graham': 35, 'John': 27})
    {'Graham': 35}

    """
    values_result = fn(record.values())
    keys_result = [k for k, v in record.items() if v == values_result]
    return {keys_result[0]: values_result}
Apply a function on the record and return the corresponding new record

    :param fn: a function
    :param record: a dictionary
    :returns: a dictionary

    >>> find(max, {'Terry': 30, 'Graham': 35, 'John': 27})
    {'Graham': 35}