class_docstr: A cleanup method for ensuring that all entities are contained in the triples of the first split part.
class_docstr_tok: ["A","cleanup","method","for","ensuring","that","all","entities","are","contained","in","the","triples","of","the","first","split","part","."]
docstr: Cleanup a list of triples array with respect to the first array.
docstr_tok: ["Cleanup","a","list","of","triples","array","with","respect","to","the","first","array","."]
code: def __call__(
      self,
      triples_groups: Sequence[MappedTriples],
      random_state: TorchRandomHint,
  ) -> Sequence[MappedTriples]:
      """Cleanup a list of triples array with respect to the first array."""
      reference, *others = triples_groups
      result = []
      for other in others:
          reference, other = self.cleanup_pair(
              reference=reference,
              other=other,
              random_state=random_state,
          )
          result.append(other)
      return reference, *result
  
imports: import logging
  import typing
  from abc import abstractmethod
  from typing import Collection, Optional, Sequence, Set, Tuple, Type, Union
  import numpy
  import pandas
  import torch
  from class_resolver.api import ClassResolver, HintOrType
  from ..constants import COLUMN_LABELS
  from ..typing import LABEL_HEAD, LABEL_RELATION, LABEL_TAIL, MappedTriples, Target, TorchRandomHint
  from ..utils import ensure_torch_random_state
label_desc: Use image node_id 2 for calling the Cleaner obj's underlying member method code with example usage: obj.__call__(triples_groups, random_state) and returns: reference,  unknown