code: def _gen_out_chunks(cls, x_chunk, y_chunk, chunk_op):
      k = chunk_op.k
      i, j = x_chunk.index[0], y_chunk.index[0]
  
      distance_chunk_params = {
          "shape": (x_chunk.shape[0], k),
          "order": TensorOrder.C_ORDER,
          "dtype": np.dtype(np.float64),
          "index": (i, j),
          "_type_": "distance",
      }
      if chunk_op.return_index:
          index_chunk_params = {
              "shape": (x_chunk.shape[0], k),
              "order": TensorOrder.C_ORDER,
              "dtype": np.dtype(np.int64),
              "index": (i, j),
              "_type_": "index",
          }
          distance_chunk, index_chunk = chunk_op.new_chunks(
              [x_chunk, y_chunk],
              kws=[distance_chunk_params, index_chunk_params],
          )
          return distance_chunk, index_chunk
      else:
          return chunk_op.new_chunks(
              [x_chunk, y_chunk], kws=[distance_chunk_params]
          )[0]
  
imports: from functools import partial
  import numpy
  from ....None import opcodes
  from ....None import options
  from ....core import recursive_tile
  from ....core.operand import OperandStage
  from ....serialization.serializables import KeyField, BoolField, DictField, Int64Field, AnyField
  from ....tensor.core import TensorOrder
  from ....tensor.merge import TensorConcatenate
  from ....tensor.array_utils import as_same_device, device, get_array_module
  from ....utils import has_unknown_shape, ensure_own_data
  from ...utils import gen_batches, get_chunk_n_rows
  from ...utils.validation import _num_samples
  from .core import PairwiseDistances
label_desc: Use image node_id 13 for calling the PairwiseDistancesTopk obj's underlying member method code with example usage: obj._gen_out_chunks(cls, x_chunk, y_chunk, chunk_op) and returns: distance_chunk,  index_chunk, chunk_op