Create a list of records to insert into the pivot table.

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