class_docstr: An operand for shuffle execution which partitions data by the value in each record’s partition key, and
  send the partitioned data from all mappers to all reducers.
class_docstr_tok: ["An","operand","for","shuffle","execution","which","partitions","data","by","the","value","in","each","record","\u2019","s","partition","key",",","and","send","the","partitioned","data","from","all","mappers","to","all","reducers","."]
code: def _new_chunks(self, inputs, kws=None, **kw):
      if getattr(self, "reducer_index", None) is None:
          index = None
          if kws:
              index = kws[0].get("index")
          self.reducer_index = index or kw.get("index")
      if self.stage == OperandStage.reduce:
          # Operands such as `TensorIndexSetValue` will have multiple inputs, some won't be ProxyChunk
          proxy_operands = [
              c.op for c in inputs if isinstance(c.op, ShuffleProxy)
          ]
          if proxy_operands:
              # For create reduce checks with `FetchShuffle`, `proxy_operands` will be empty.
              proxy = proxy_operands[0]
              self.reducer_ordinal = proxy.n_reducers
              proxy.n_reducers += 1
      return super()._new_chunks(inputs, kws, **kw)
  
file_path: mars/mars/core/operand/shuffle.py
imports: from .None import ShuffleFetchType, FetchShuffle
  from ...None import opcodes
  from ...serialization.serializables import Int32Field, StringField, TupleField, FieldTypes
  from .base import Operand, VirtualOperand, OperandStage
label_desc: Use image node_id 2 for calling the MapReduceOperand obj's underlying member method code with example usage: obj._new_chunks(inputs, kws) and returns: super