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","."]
docstr: The mapper stage must ensure all mapper blocks are inserted into ctx and no blocks
  for some reducers are missing. This is needed by shuffle fetch by index,
  which shuffle block are identified by the  index instead of data keys.
  For operands implementation simplicity, we can sort the `ctx` by key which are (chunk key, reducer index) tuple
  and relax the insert order requirements.
docstr_tok: ["The","mapper","stage","must","ensure","all","mapper","blocks","are","inserted","into","ctx","and","no","blocks","for","some","reducers","are","missing",".","This","is","needed","by","shuffle","fetch","by","index",",","which","shuffle","block","are","identified","by","the","index","instead","of","data","keys",".","For","operands","implementation","simplicity",",","we","can","sort","the","`","ctx","`","by","key","which","are","(","chunk","key",",","reducer","index",")","tuple","and","relax","the","insert","order","requirements","."]
code: def execute(self, ctx, op):
      """The mapper stage must ensure all mapper blocks are inserted into ctx and no blocks
      for some reducers are missing. This is needed by shuffle fetch by index,
      which shuffle block are identified by the  index instead of data keys.
      For operands implementation simplicity, we can sort the `ctx` by key which are (chunk key, reducer index) tuple
      and relax the insert order requirements.
      """
  
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 6 for calling the MapReduceOperand obj's underlying member method code with example usage: obj.execute(ctx, op) without return types