code: def isin(
      elements, test_elements, *, assume_unique=False, invert=False
  ):
      input_elements_copy = ivy.reshape(ivy.to_ivy(elements), (-1,))
      test_elements_copy = ivy.reshape(ivy.to_ivy(test_elements), (-1,))
  
      if (
          ivy.shape(test_elements_copy)[0]
          < 10 * ivy.shape(input_elements_copy)[0] ** 0.145
      ):
          if invert:
              mask = ivy.ones(
                  ivy.shape(input_elements_copy[0]), dtype=bool
              )
              for a in test_elements_copy:
                  mask &= input_elements_copy != a
          else:
              mask = ivy.zeros(
                  ivy.shape(input_elements_copy[0]), dtype=bool
              )
              for a in test_elements_copy:
                  mask |= input_elements_copy == a
          return ivy.reshape(mask, ivy.shape(elements))
  
      if not assume_unique:
          input_elements_copy, rev_idx = ivy.unique_inverse(
              input_elements_copy
          )
          test_elements_copy = ivy.sort(
              ivy.unique_values(test_elements_copy)
          )
  
      ar = ivy.concat((input_elements_copy, test_elements_copy))
  
      order = ivy.argsort(ar, stable=True)
      sar = ar[order]
      if invert:
          bool_ar = sar[1:] != sar[:-1]
      else:
          bool_ar = sar[1:] == sar[:-1]
      flag = ivy.concat((bool_ar, ivy.array([invert])))
      ret = ivy.empty(ivy.shape(ar), dtype=bool)
      ret[order] = flag
  
      if assume_unique:
          return ivy.reshape(
              ret[: ivy.shape(input_elements_copy)[0]],
              ivy.shape(elements),
          )
      else:
          return ivy.reshape(ret[rev_idx], ivy.shape(elements))
  
imports: import ivy
  import ivy.functional.frontends.torch
  from ivy.func_wrapper import with_unsupported_dtypes
  from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back
  from collections import namedtuple
label_desc: Use image node_id 13 for calling a global function with example usage: isin(elements, test_elements) and returns: ivy, ivy, ivy