def best_customer_record(new_record, top_record):
    """Find the best customer record.

    Compares the new_record to the current top_record to determine what's the
    best extra_dimension for the customer.
    Records are lists containing the following information in the specified
    position:
    2: dimension_count
    3: tot_sales
    4: max_dimension_date

    Args:
        new_record: New record that we want to compare to the current top
            record.
        top_record: The current top record.

    Returns:
        The best record according to the logic.
    """
    if new_record[2] > top_record[2] or \
        new_record[2] == top_record[2] and new_record[4] > top_record[4] or \
        new_record[2] == top_record[2] and new_record[4] == top_record[4] and \
        new_record[3] > top_record[3]:
        return new_record
    return top_record