<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def primary_key_field(self):
 """Return the primary key field. Is `id` in most cases. Is `history_id` for Historical models. """

        return [field for field in self.instance._meta.fields if field.primary_key][0]