<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def deleted_records(endpoint):
 """Populate the ``deleted_records`` key."""

    @utils.for_each_value
    def _deleted_records(self, key, value):
        deleted_recid = maybe_int(value.get('a'))
        if deleted_recid:
            return get_record_ref(deleted_recid, endpoint)

    return _deleted_records