<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _create_attach_records(self, ids, attributes):
 """ Create a list of records to insert into the pivot table. """

        records = []

        timed = self._has_pivot_column(self.created_at()) or self._has_pivot_column(
            self.updated_at()
        )

        for key, value in enumerate(ids):
            records.append(self._attacher(key, value, attributes, timed))

        return records