code: def tile(cls, op):
      from ..merge.stack import TensorStack
      from ..reduction import TensorAll, TensorAny
  
      ar1, ar2 = op.inputs
      invert = op.invert
      out = op.outputs[0]
  
      out_chunks = []
      for ar1_chunk in ar1.chunks:
          to_concat_chunks = []
          for ar2_chunk in ar2.chunks:
              chunk_op = op.copy().reset_key()
              out_chunk = chunk_op.new_chunk(
                  [ar1_chunk, ar2_chunk],
                  dtype=out.dtype,
                  shape=ar1_chunk.shape,
                  order=out.order,
                  index=ar1_chunk.index,
              )
              to_concat_chunks.append(out_chunk)
          if len(to_concat_chunks) == 1:
              out_chunks.append(to_concat_chunks[0])
          else:
              # concat chunks
              concat_op = TensorStack(axis=0)
              shape = (len(to_concat_chunks),) + ar1_chunk.shape
              concat_chunk = concat_op.new_chunk(
                  to_concat_chunks,
                  shape=shape,
                  dtype=out.dtype,
                  order=out.order,
              )
              if not invert:
                  chunk_op = TensorAny(axis=(0,), dtype=out.dtype)
                  out_chunk = chunk_op.new_chunk(
                      [concat_chunk],
                      shape=ar1_chunk.shape,
                      dtype=out.dtype,
                      order=out.order,
                      index=ar1_chunk.index,
                  )
              else:
                  chunk_op = TensorAll(axis=(0,), dtype=out.dtype)
                  out_chunk = chunk_op.new_chunk(
                      [concat_chunk],
                      shape=ar1_chunk.shape,
                      dtype=out.dtype,
                      order=out.order,
                      index=ar1_chunk.index,
                  )
              out_chunks.append(out_chunk)
  
      params = out.params.copy()
      params["nsplits"] = ar1.nsplits
      params["chunks"] = out_chunks
      new_op = op.copy()
      return new_op.new_tensors(op.inputs, kws=[params])
  
file_path: mars/mars/tensor/base/isin.py
imports: from typing import Union
  import numpy
  from ...None import opcodes
  from ...serialization.serializables import BoolField
  from ...typing import TileableType
  from ..operands import TensorOperand, TensorOperandMixin
  from ..datasource import tensor
  from ..array_utils import as_same_device, device
  from ..core import TensorOrder
label_desc: Use image node_id 2 for calling the TensorIsIn obj's underlying member method code with example usage: obj.tile(cls, op) and returns: new_op