def __call__(self, data: Dict[str, Any], user_id: Optional[UUID] = None) -> Record:
        """Maps a dictionary of data to a record object.

        Parameters:
            data: A dictionary representing the record.
            user_id: The user id to associate with the record responses.

        Returns:
            Record: The record object.

        """

        record_id = data.get(self.mapping.id.source)
        suggestions = self._map_suggestions(data=data, mapping=self.mapping.suggestion)
        responses = self._map_responses(data=data, user_id=user_id or self.user_id, mapping=self.mapping.response)
        fields = self._map_attributes(data=data, mapping=self.mapping.field)
        metadata = self._map_attributes(data=data, mapping=self.mapping.metadata)
        vectors = self._map_attributes(data=data, mapping=self.mapping.vector)

        unknown_keys = [key for key in data.keys() if key not in self.mapping.keys()]
        if unknown_keys:
            warnings.warn(f"Keys {unknown_keys} in data are not present in the mapping and will be ignored.")

        if len([k for k in data if k != self.mapping.id.source]) == 0:
            raise RecordsIngestionError(
                message=f"Record has no data. All records must have at least one attribute. Record id: {record_id}."
            )

        if data and not (record_id or suggestions or responses or fields or metadata or vectors):
            raise RecordsIngestionError(
                message=f"""Record has no identifiable keys. If keys in source dataset
                do not match the names in `dataset.settings`, you should use a
                `mapping` with `dataset.records.log`.
                Available keys: {self.mapping.keys()}.
                Unkown keys: {unknown_keys}. """
            )

        return Record(
            id=record_id,
            fields=fields,
            vectors=vectors,
            metadata=metadata,
            suggestions=suggestions,
            responses=responses,
            _dataset=self._dataset,
        )
Maps a dictionary of data to a record object.

        Parameters:
            data: A dictionary representing the record.
            user_id: The user id to associate with the record responses.

        Returns:
            Record: The record object.

        
argilla/src/argilla/records/_mapping/_mapper.py