<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_field_changed(instance, old_instance, field_name, update_fields=None):
 """ Examines update_fields and an attribute of an instance to determine if that attribute has changed prior to the instance being saved. Parameters field_name : str instance : object old_instance : object update_fields : list of str, optional """

    if update_fields is not None and field_name not in update_fields:
        return False

    return getattr(instance, field_name) != getattr(old_instance, field_name)