code: def execute(cls, ctx, op):
      xp = array_module(op.gpu)
      if xp is np:
          device_id = -1
      else:
          device_id = op.device or 0
  
      with device(device_id):
          rs = xp.random.RandomState(op.seed)
  
          args = []
          for k in op.args:
              val = getattr(op, k, None)
              if isinstance(val, TENSOR_CHUNK_TYPE):
                  args.append(ctx[val.key])
              else:
                  args.append(val)
  
          method_name = getattr(cls, "_func_name")
          try:
              res = getattr(rs, method_name)(*args)
              if xp is not np:
                  ctx[op.outputs[0].key] = xp.asarray(res)
              else:
                  ctx[op.outputs[0].key] = res
          except AttributeError:
              if xp is not np:
                  # cupy cannot generate, fall back to numpy
                  rs = np.random.RandomState(op.seed)
                  res = getattr(rs, method_name)(*args)
                  ctx[op.outputs[0].key] = xp.asarray(res)
              else:
                  raise
  
imports: import itertools
  from collections.abc import Iterable
  from contextlib import contextmanager
  import numpy
  from ...config import options
  from ...core import recursive_tile
  from ...serialization.serializables import FieldTypes, TupleField, Int32Field
  from ..core import TENSOR_TYPE, TENSOR_CHUNK_TYPE
  from ..utils import decide_chunk_sizes, gen_random_seeds, broadcast_shape
  from ..array_utils import array_module, device
  from ..operands import TensorOperand, TensorMapReduceOperand, TensorOperandMixin
  from ..datasource import tensor
  from ..base import broadcast_to
label_desc: Use image node_id 1 for calling the TensorDistribution obj's underlying member method code with example usage: obj.execute(cls, ctx, op) without return types