code: def execute(cls, ctx, op):
      inputs, device_id, xp = as_same_device(
          flatten([ctx[inp.key] for inp in op.inputs]),
          device=op.device,
          ret_extra=True,
      )
      if len(inputs) == 2:
          a, indices = inputs
      else:
          a, indices = inputs[0], None
  
      k = op.k
      axis = op.axis
      to_sort = op.sorted
      largest = op.largest
      return_value = op.return_value
      return_indices = op.return_indices
      axis_offset = op.axis_offset
  
      with device(device_id):
          av, ap = _topk_helper(
              xp,
              a,
              k,
              axis=axis,
              largest=largest,
              sorted=to_sort,
              order=op.order,
              indices=indices,
              axis_offset=axis_offset,
              return_value=return_value,
              return_indices=return_indices,
          )
          if op.stage != OperandStage.agg:
              out = [av]
              if op.return_indices:
                  out.append(ap)
              ctx[op.outputs[0].key] = tuple(out)
          else:
              if op.return_value:
                  ctx[op.outputs[0].key] = av
              if op.return_indices:
                  ctx[op.outputs[-1].key] = ap
  
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 22 for calling the TensorTopk obj's underlying member method code with example usage: obj.execute(cls, ctx, op) without return types