code: def execute(cls, ctx, op):
      return_value, return_indices = op.return_value, op.return_indices
  
      raw_inputs = [ctx[inp.key] for inp in op.inputs]
      flatten_inputs = flatten(raw_inputs)
      inputs, device_id, xp = as_same_device(
          flatten_inputs, device=op.device, ret_extra=True
      )
      inputs = stack_back(inputs, raw_inputs)
      partition_info = inputs[-1]
      merged_data, merged_indices = None, None
      if return_value:
          merged_data = inputs[0]
      if return_indices:
          # if return indices, value should be returned
          assert len(inputs) == 3
          if not return_value:
              merged_data = inputs[0]
          merged_indices = inputs[1]
  
      outs, out_indices = [], []
      with device(device_id):
          kw = {}
          if op.kind is not None:
              kw["kind"] = op.kind
          if op.order is not None:
              kw["order"] = op.order
  
          ravel_partition_info = partition_info.reshape(
              -1, partition_info.shape[-1]
          )
          for i, merged_vec, kth in zip(
              itertools.count(), merged_data, ravel_partition_info
          ):
              kth = kth[kth > -1]
              if kth.size == 0:
                  if return_value:
                      outs.append(merged_vec)
                  if return_indices:
                      out_indices.append(merged_indices[i])
              else:
                  if return_indices:
                      argparts = xp.argpartition(merged_vec, kth, **kw)
                      if return_value:
                          outs.append(xp.take(merged_vec, argparts))
                      out_indices.append(
                          xp.take(merged_indices[i], argparts)
                      )
                  else:
                      outs.append(xp.partition(merged_vec, kth, **kw))
  
      if not op.need_align:
          assert len(outs or out_indices) == 1
          i = 0
          if return_value:
              ctx[op.outputs[0].key] = outs[0]
              i += 1
          if return_indices:
              ctx[op.outputs[i].key] = out_indices[0]
      else:
          i = 0
          if return_value:
              ctx[op.outputs[0].key] = tuple(outs)
              i += 1
          if return_indices:
              ctx[op.outputs[i].key] = tuple(out_indices)
  
imports: import itertools
  import numpy
  from ...None import opcodes
  from ...core import recursive_tile
  from ...serialization.serializables import FieldTypes, KeyField, Int32Field, StringField, ListField, BoolField, AnyField
  from ...utils import has_unknown_shape, flatten, stack_back
  from ...core import ENTITY_TYPE, ExecutableTuple
  from ..operands import TensorOperand, TensorShuffleProxy
  from ..core import TENSOR_TYPE, TENSOR_CHUNK_TYPE, TensorOrder
  from ..array_utils import as_same_device, device
  from ..datasource import tensor
  from ..utils import validate_axis, validate_order
  from .psrs import TensorPSRSOperandMixin
label_desc: Use image node_id 8 for calling the PartitionMerged obj's underlying member method code with example usage: obj.execute(cls, ctx, op) without return types