class_docstr: A filterer using Python sets for filtering.
  
  This filterer is expected to be rather slow due to the conversion from torch long tensors to Python tuples. It can
  still serve as a baseline for performance comparison.
code: def contains(
      self, batch: MappedTriples
  ) -> torch.BoolTensor:  # noqa: D102
      return torch.as_tensor(
          data=[
              tuple(triple) in self.triples
              for triple in batch.view(-1, 3).tolist()
          ],
          dtype=torch.bool,
          device=batch.device,
      ).view(*batch.shape[:-1])
  
imports: import math
  from abc import abstractmethod
  from typing import Iterable
  import torch
  from class_resolver import ClassResolver
  from torch import nn
  from ..typing import MappedTriples
  from ..utils import triple_tensor_to_set
label_desc: Use image node_id 2 for calling the PythonSetFilterer obj's underlying member method code with example usage: obj.contains(batch) and returns: torch