code: def _gen_kws(cls, op, input_obj, chunk=False, chunk_index=None):
      kws = []
  
      # unique tensor
      shape = list(input_obj.shape)
      shape[op.axis] = np.nan
      kw = {
          "shape": tuple(shape),
          "dtype": input_obj.dtype,
          "gpu": input_obj.op.gpu,
      }
      if chunk:
          idx = [0] * len(shape)
          idx[op.axis] = chunk_index or 0
          kw["index"] = tuple(idx)
      kws.append(kw)
  
      # unique indices tensor
      if op.return_index:
          kw = {
              "shape": (np.nan,),
              "dtype": np.dtype(np.intp),
              "gpu": input_obj.op.gpu,
              "type": "indices",
          }
          if chunk:
              kw["index"] = (chunk_index or 0,)
          kws.append(kw)
  
      # unique inverse tensor
      if op.return_inverse:
          kw = {
              "shape": (input_obj.shape[op.axis],),
              "dtype": np.dtype(np.intp),
              "gpu": input_obj.op.gpu,
              "type": "inverse",
          }
          if chunk:
              kw["index"] = (chunk_index or 0,)
          kws.append(kw)
  
      # unique counts tensor
      if op.return_counts:
          kw = {
              "shape": (np.nan,),
              "dtype": np.dtype(np.int_),
              "gpu": input_obj.op.gpu,
              "type": "counts",
          }
          if chunk:
              kw["index"] = (chunk_index or 0,)
          kws.append(kw)
  
      return kws
  
imports: import itertools
  import numpy
  from ...None import opcodes
  from ...config import options
  from ...core import recursive_tile
  from ...core.operand import OperandStage
  from ...lib import sparse
  from ...lib.sparse.core import get_array_module
  from ...serialization.serializables import BoolField, Int32Field, Int64Field
  from ...utils import has_unknown_shape
  from ..operands import TensorMapReduceOperand, TensorOperandMixin, TensorShuffleProxy
  from ..array_utils import as_same_device, device
  from ..core import TensorOrder
  from ..utils import validate_axis, hash_on_axis
label_desc: Use image node_id 9 for calling the TensorUnique obj's underlying member method code with example usage: obj._gen_kws(cls, op, input_obj, chunk, chunk_index) and returns: kws