def __call__(self, record: TextClassificationRecord) -> Optional[Union[str, List[str]]]:
        """Check if the given record is among the matching ids from the ``self.apply`` call.

        Args:
            record: The record to be labelled.

        Returns:
            A label or list of labels if the record id is among the matching ids, otherwise None.

        Raises:
            RuleNotAppliedError: If the rule was not applied to the dataset before.
        """
        if self._matching_ids is None:
            raise RuleNotAppliedError("Rule was still not applied. Please call `self.apply(dataset)` first.")

        try:
            self._matching_ids[record.id]
        except KeyError:
            return None
        else:
            return self._label
Check if the given record is among the matching ids from the ``self.apply`` call.

        Args:
            record: The record to be labelled.

        Returns:
            A label or list of labels if the record id is among the matching ids, otherwise None.

        Raises:
            RuleNotAppliedError: If the rule was not applied to the dataset before.
        
argilla-v1/src/argilla_v1/labeling/text_classification/rule.py