code: def tile(cls, op):
      if has_unknown_shape(*op.inputs):
          yield
      A_data, A_ind = op.a_data, op.a_ind
      out = op.outputs[0]
  
      shape1 = A_ind.shape[1]
      if A_data is not None:
          # mode == 'distance'
          axis0_chunk_sizes = decide_unify_split(
              A_data.nsplits[0], A_ind.nsplits[0]
          )
          A_data = yield from recursive_tile(
              A_data.rechunk({0: axis0_chunk_sizes, 1: shape1})
          )
          A_ind = yield from recursive_tile(
              A_ind.rechunk({0: axis0_chunk_sizes, 1: shape1})
          )
      else:
          # mode == 'connectivity'
          A_ind = yield from recursive_tile(A_ind.rechunk({1: shape1}))
  
      out_chunks = []
      for i, ind_c in enumerate(A_ind.chunks):
          chunk_op = op.copy().reset_key()
          chunk_inputs = [ind_c]
          if A_data is not None:
              data_c = A_data.cix[i, 0]
              chunk_inputs.insert(0, data_c)
          out_chunk = chunk_op.new_chunk(
              chunk_inputs,
              dtype=out.dtype,
              shape=(ind_c.shape[0], out.shape[1]),
              order=out.order,
              index=(i, 0),
          )
          out_chunks.append(out_chunk)
  
      new_op = op.copy()
      params = out.params
      params["chunks"] = out_chunks
      params["nsplits"] = (A_ind.nsplits[0], (out.shape[1],))
      return new_op.new_tileables(op.inputs, kws=[params])
  
imports: import numpy
  from ...None import opcodes
  from ...core import recursive_tile
  from ...lib.sparse.array import get_sparse_module, SparseNDArray
  from ...serialization.serializables import KeyField, Int64Field
  from ...tensor.array_utils import as_same_device, device
  from ...tensor.core import TensorOrder
  from ...tensor.utils import decide_unify_split
  from ...utils import has_unknown_shape
  from ..operands import LearnOperand, LearnOperandMixin, OutputType
label_desc: Use image node_id 7 for calling the KNeighborsGraph obj's underlying member method code with example usage: obj.tile(cls, op) and returns: new_op