code: def _create_attach_record(self, id, timed):
          
          record = {}
  
          record[self._foreign_key] = self._parent.get_key()
  
          record[self._other_key] = id
  
          if timed:
              record = self._set_timestamps_on_attach(record)
  
          return record
docs: Create a new pivot attachement record.