code: def isin(elements, test_elements):
      """Tests if each element of elements is in test_elements. Returns a boolean
      tensor of the same shape as elements that is True for elements in
      test_elements and False otherwise.
  
      Parameters
      ----------
      elements : torch.Tensor
          A 1D tensor represents the input elements.
      test_elements : torch.Tensor
          A 1D tensor represents the values to test against for each input.
  
      Examples
      --------
      >>> isin(torch.tensor([1, 2, 3, 4]), torch.tensor([2, 3]))
      tensor([[False,  True,  True,  False]])
      """
      assert elements.dim() == 1, "Elements should be 1D tensor."
      assert (
          test_elements.dim() == 1
      ), "Test_elements should be 1D tensor."
      return torch.ops.graphbolt.isin(elements, test_elements)
  
file_path: dgl/python/dgl/graphbolt/base.py
imports: from dataclasses import dataclass
  import torch
  from torch.utils.data import functional_datapipe
  from torchdata.datapipes.iter import IterDataPipe
  from ..utils import recursive_apply
label_desc: Use image node_id 2 for calling a global function with example usage: isin(elements, test_elements) and returns: torch