class_docstr: An auxiliary data structure that allows user to control stages and track progress in a single averaging step
  
  :param scheduled_time: estimated time when averaging should begin. Will be used for scheduling
  :param deadline: if averaging is still in progress at this time, it should be stopped due to TimeoutError
  :param allow_retries: if True, allow running matchmaking and all-reduce again if previous attempt fails
  :param weight: averaging weight, can be changed afterwards
  :param data_for_gather: send this data to all peers in the next group and gather it from groupmates
code: def __init__(
      self,
      scheduled_time: DHTExpiration,
      deadline: float,
      allow_retries: bool,
      weight: float,
      data_for_gather: bytes,
  ):
      super().__init__()
      self._data_for_gather, self._deadline, self._allow_retries = (
          data_for_gather,
          deadline,
          allow_retries,
      )
      self._trigger: Optional[MPFuture] = None
      self._cancel: Optional[MPFuture] = None
  
      # Buffer contents:
      # scheduled_time (double) | weight (double) | stage (AveragingStage, 1 byte) | began_allreduce: (bool, 1 byte)
      self._shared_buffer = torch.zeros(
          [18], dtype=torch.uint8
      ).share_memory_()
      self.stage = AveragingStage.IDLE
      self.scheduled_time = scheduled_time
      self.weight = weight
      self.began_allreduce = False
  
imports: import os
  import struct
  from enum import Enum
  from typing import Optional
  import numpy
  import torch
  from hivemind.utils import DHTExpiration, MPFuture, get_dht_time, get_logger
label_desc: Use image node_id 1 to create a new StepControl object from inherited base classes: MPFuture with example: obj = StepControl(scheduled_time, deadline, allow_retries, weight, data_for_gather)