class_docstr: Mixed input. Take a list of tensor as input, select some of them and return the sum.
  
  Attributes
  ----------
  _sampled : int or list of int
      Sampled input indices.
class_docstr_tok: ["Mixed","input",".","Take","a","list","of","tensor","as","input",",","select","some","of","them","and","return","the","sum",".","Attributes","--","--","--","--","--","_sampled",":","int","or","list","of","int","Sampled","input","indices","."]
code: def __init__(
      self, n_candidates: int, n_chosen: int, reduction: str, label: str
  ):
      super().__init__(
          n_candidates,
          n_chosen=n_chosen,
          reduction=reduction,
          label=label,
      )
      self._sampled: list[int] | int | None = None
  
imports: from __future__ import annotations
  import copy
  import functools
  import random
  from typing import Any, List, Dict, Sequence, cast
  import torch
  import torch.nn
  from nni.mutable import MutableExpression, label_scope, Mutable, Categorical, CategoricalMultiple
  from nni.nas.nn.pytorch import LayerChoice, InputChoice, Repeat, Cell
  from nni.nas.nn.pytorch.cell import CellOpFactory, create_cell_op_candidates, preprocess_cell_inputs
  from .base import BaseSuperNetModule
  from ._expression_utils import weighted_sum
  from .operation import MixedOperationSamplingPolicy, MixedOperation
label_desc: Use image node_id 1 to create a new PathSamplingInput object from inherited base classes: InputChoice, BaseSuperNetModule with example: obj = PathSamplingInput(n_candidates, n_chosen, reduction, label)