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","."]
docstr: Override this to implement customized reduction.
code: def _reduction(self, items: list[Any], sampled: list[Any]) -> Any:
      """Override this to implement customized reduction."""
      if len(items) == 1:
          return items[0]
      else:
          if self.reduction == "sum":
              return sum(items)
          elif self.reduction == "mean":
              return sum(items) / len(items)
          elif self.reduction == "concat":
              return torch.cat(items, 1)
          raise ValueError(
              f"Unsupported reduction type: {self.reduction}"
          )
  
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 5 for calling the PathSamplingInput obj's underlying member method code with example usage: obj._reduction(items, sampled) and returns: items, sum, unknown, torch