code: def _tile_via_tree(cls, op):
      a = op.input
      axis = op.axis
      return_value, return_indices = op.return_value, op.return_indices
      combine_size = options.combine_size
      axis_offsets = [0] + np.cumsum(a.nsplits[axis]).tolist()[:-1]
  
      out_chunks, indices_chunks = [], []
      for other_idx in itertools.product(
          *(range(s) for i, s in enumerate(a.chunk_shape) if i != axis)
      ):
          merge_chunks = []
          for j in range(a.chunk_shape[axis]):
              idx = list(other_idx)
              idx.insert(axis, j)
              input_chunk = a.cix[tuple(idx)]
              merge_chunks.append(
                  cls._gen_topk_chunk(
                      input_chunk,
                      op,
                      False,
                      axis_offset=axis_offsets[j],
                  )
              )
          while len(merge_chunks) > combine_size:
              new_size = ceildiv(len(merge_chunks), combine_size)
              new_merge_chunks = []
              for i in range(new_size):
                  to_merge_chunks = merge_chunks[
                      i * combine_size : (i + 1) * combine_size
                  ]
                  merge_chunk = cls._merge_chunks(to_merge_chunks, axis)
                  topk_chunk = cls._gen_topk_chunk(
                      merge_chunk, op, False
                  )
                  new_merge_chunks.append(topk_chunk)
              merge_chunks = new_merge_chunks
  
          merge_chunk = cls._merge_chunks(merge_chunks, axis)
          chunk_index = list(other_idx)
          chunk_index.insert(axis, 0)
          chunks = cls._gen_topk_chunk(
              merge_chunk, op, True, chunk_index=tuple(chunk_index)
          )
          if return_value:
              out_chunks.append(chunks[0])
          if return_indices:
              indices_chunks.append(chunks[-1])
  
      new_op = op.copy()
      nsplits = list(a.nsplits)
      nsplits[axis] = (min(a.shape[axis], op.k),)
      kws = [out.params for out in op.outputs]
      if return_value:
          kws[0]["nsplits"] = nsplits
          kws[0]["chunks"] = out_chunks
      if return_indices:
          kws[-1]["nsplits"] = nsplits
          kws[-1]["chunks"] = indices_chunks
      return new_op.new_tensors(op.inputs, kws=kws)
  
imports: import itertools
  import numpy
  from ...None import opcodes
  from ...config import options
  from ...core import ExecutableTuple, recursive_tile
  from ...core.operand import OperandStage
  from ...serialization.serializables import FieldTypes, KeyField, Int64Field, Int32Field, BoolField, StringField, ListField
  from ...utils import ceildiv, flatten
  from ..array_utils import as_same_device, device
  from ..core import TensorOrder
  from ..datasource import tensor
  from ..operands import TensorOperand, TensorOperandMixin
  from ..utils import validate_axis, validate_order
  from .sort import _validate_sort_psrs_kinds
label_desc: Use image node_id 20 for calling the TensorTopk obj's underlying member method code with example usage: obj._tile_via_tree(cls, op) and returns: new_op