<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def groupby_field(records, field_name, skip_none=True):
 """ Given a list of objects, group them into a dictionary by the unique values of a given field name. """

    return apply_groupby(
        records,
        lambda obj: getattr(obj, field_name),
        skip_none=skip_none)