code: def _tile_sample_without_replacement(cls, op, a, nsplits):
      from ..base import searchsorted
      from ..merge.stack import TensorStack
      from ..indexing.getitem import TensorIndex
  
      out = op.outputs[0]
      out_shape = tuple(sum(ns) for ns in nsplits)
      # to sample count
      m = np.prod(out_shape).item()
  
      if isinstance(a, Integral):
          a_size = a
          a = arange(a)
      else:
          a = array(a)
          a_size = a.size
      a = yield from recursive_tile(a)
  
      if any(cs < m for cs in a.nsplits[0]):
          # make sure all chunk > m
          n_chunk = min(max(a.size // (m + 1), 1), a.chunk_shape[0])
          chunk_size = ceildiv(a.size, n_chunk)
          chunk_sizes = normalize_chunk_sizes(a.size, chunk_size)[0]
          if chunk_sizes[-1] < m and len(chunk_sizes) > 1:
              # the last chunk may still less than m
              # merge it into previous one
              chunk_sizes[-2] += chunk_sizes[-1]
              chunk_sizes = chunk_sizes[:-1]
          a = yield from recursive_tile(a.rechunk({0: chunk_sizes}))
          if len(chunk_sizes) == 1:
              return cls._tile_one_chunk(op, a, None)
  
      # for each chunk in a, do regular sampling
      sampled_chunks = []
      sample_seeds = gen_random_seeds(
          len(a.chunks), np.random.RandomState(op.seed)
      )
      for seed, chunk in zip(sample_seeds, a.chunks):
          chunk_op = op.copy().reset_key()
          chunk_op._a = chunk
          chunk_op.size = (m,)
          chunk_op.seed = seed
          sampled_chunk = chunk_op.new_chunk(
              [chunk], shape=(m,), order=out.order, index=chunk.index
          )
          sampled_chunks.append(sampled_chunk)
  
      if len(sampled_chunks) == 1:
          out_chunk = sampled_chunks[0]
      else:
          stacked_chunk = TensorStack(
              axis=0, dtype=sampled_chunks[0].dtype
          ).new_chunk(
              sampled_chunks,
              shape=(len(a.chunks), m),
              order=TensorOrder.C_ORDER,
          )
  
          # gen indices with length m from 0...a.size
          state = RandomState.from_numpy(np.random.RandomState(op.seed))
          indices = state.randint(a_size, size=(m,))
          cum_offsets = np.cumsum(a.nsplits[0])
          ind = yield from recursive_tile(
              searchsorted(cum_offsets, indices, side="right")
          )
          ind_chunk = ind.chunks[0]
  
          # do fancy index to find result
          arange_tensor = yield from recursive_tile(arange(m))
          indexes = [ind_chunk, arange_tensor.chunks[0]]
          out_chunk = TensorIndex(
              dtype=stacked_chunk.dtype, indexes=indexes
          ).new_chunk(
              [stacked_chunk] + list(indexes),
              shape=(m,),
              order=TensorOrder.C_ORDER,
          )
  
      ret = op.copy().new_tensor(
          op.inputs,
          shape=(m,),
          order=out.order,
          nsplits=((m,),),
          chunks=[out_chunk],
      )
      if len(out_shape) > 0:
          ret = yield from recursive_tile(ret.reshape(out_shape))
      ret = yield from recursive_tile(ret.rechunk(nsplits))
      return [ret]
  
imports: from numbers import Integral
  import numpy
  from ...None import opcodes
  from ...config import options
  from ...core import recursive_tile
  from ...serialization.serializables import FieldTypes, AnyField, KeyField, BoolField, TupleField
  from ...utils import has_unknown_shape, ceildiv
  from ..operands import TensorOperandMixin
  from ..core import TENSOR_TYPE, TENSOR_CHUNK_TYPE, TensorOrder
  from ..datasource import arange, array
  from ..utils import decide_chunk_sizes, normalize_chunk_sizes, gen_random_seeds
  from ..array_utils import as_same_device, device
  from .core import TensorRandomOperand, RandomState
label_desc: Use image node_id 5 for calling the TensorChoice obj's underlying member method code with example usage: obj._tile_sample_without_replacement(cls, op, a, nsplits) and returns: list, cls