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: Clean up one set of triples with respect to a reference set.
  
  :param reference:
      the reference set of triples, which shall contain triples for all entities
  :param other:
      the other set of triples
  :param random_state:
      the random state to use, if any randomized operations take place
  
  :return:
      a pair (reference, other), where some triples of other may have been moved into reference
docstr_tok: ["Clean","up","one","set","of","triples","with","respect","to","a","reference","set",".",":","param","reference",":","the","reference","set","of","triples",",","which","shall","contain","triples","for","all","entities",":","param","other",":","the","other","set","of","triples",":","param","random_state",":","the","random","state","to","use",",","if","any","randomized","operations","take","place",":","return",":","a","pair","(","reference",",","other",")",",","where","some","triples","of","other","may","have","been","moved","into","reference"]
code: def cleanup_pair(
      self,
      reference: MappedTriples,
      other: MappedTriples,
      random_state: TorchRandomHint,
  ) -> Tuple[MappedTriples, MappedTriples]:
      """
      Clean up one set of triples with respect to a reference set.
  
      :param reference:
          the reference set of triples, which shall contain triples for all entities
      :param other:
          the other set of triples
      :param random_state:
          the random state to use, if any randomized operations take place
  
      :return:
          a pair (reference, other), where some triples of other may have been moved into reference
      """
      raise NotImplementedError
  
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 1 for calling the Cleaner obj's underlying member method code with example usage: obj.cleanup_pair(reference, other, random_state) without return types