code: def _execute_single(cls, ctx, op):
      from scipy.spatial.distance import pdist
  
      inputs, device_id, xp = as_same_device(
          [ctx[inp.key] for inp in op.inputs],
          device=op.device,
          ret_extra=True,
      )
  
      if xp is cp:  # pragma: no cover
          raise NotImplementedError(
              "`pdist` does not support running on GPU yet"
          )
  
      with device(device_id):
          inputs_iter = iter(inputs)
          x = next(inputs_iter)
          kw = dict()
          if op.p is not None:
              kw["p"] = op.p
          if op.w is not None:
              kw["w"] = next(inputs_iter)
          if op.v is not None:
              kw["V"] = next(inputs_iter)
          if op.vi is not None:
              kw["VI"] = next(inputs_iter)
  
      ctx[op.outputs[0].key] = pdist(
          ensure_own_data(x), metric=op.metric, **kw
      )
  
imports: from typing import List, Tuple
  import numpy
  from ....None import opcodes
  from ....core import recursive_tile
  from ....core.operand import OperandStage
  from ....serialization.serializables import FieldTypes, KeyField, AnyField, Float16Field, Int32Field, TupleField
  from ....utils import has_unknown_shape, require_module, ensure_own_data
  from ....config import options
  from ...operands import TensorMapReduceOperand, TensorOperandMixin, TensorShuffleProxy
  from ...array_utils import as_same_device, device, cp
  from ...core import TensorOrder
  from ...datasource.array import tensor
label_desc: Use image node_id 21 for calling the TensorPdist obj's underlying member method code with example usage: obj._execute_single(cls, ctx, op) without return types