code: def test_isin_many_dim(size: Tuple[int, ...]):
      """Tests for isin_many_dim."""
      generator = torch.manual_seed(seed=42)
      elements = torch.rand(size=size, generator=generator)
      test_elements = torch.cat(
          [elements[:3], torch.rand(size=size, generator=generator)]
      )
      mask = pykeen.predict.isin_many_dim(
          elements=elements, test_elements=test_elements, dim=0
      )
      assert mask.shape == (elements.shape[0],)
      assert mask.dtype == torch.bool
      assert mask[:3].all()
  
imports: from typing import Any, Collection, Iterable, MutableMapping, Optional, Sequence, Tuple, Union
  import numpy
  import pandas
  import pytest
  import torch
  import unittest_templates
  import pykeen.models
  import pykeen.models.mocks
  import pykeen.predict
  import pykeen.regularizers
  import pykeen.typing
  from pykeen.constants import COLUMN_LABELS
  from pykeen.datasets.nations import Nations
  from pykeen.triples.triples_factory import AnyTriples, CoreTriplesFactory, KGInfo
  from pykeen.utils import resolve_device
  from tests import cases
label_desc: Use image node_id 1 for calling a global function with example usage: test_isin_many_dim(size) without return types