class_docstr: Stores state needed to perform the default communication algorithm within a communication hook.
  
  Args:
      process_group (ProcessGroup): The process group to be used.
class_docstr_tok: ["Stores","state","needed","to","perform","the","default","communication","algorithm","within","a","communication","hook",".","Args",":","process_group","(","ProcessGroup",")",":","The","process","group","to","be","used","."]
code: def _get_gradient_predivide_factor(world_size: int) -> float:
      factor: int = 1
      while world_size % factor == 0 and world_size / factor > factor:
          factor *= 2
      return float(factor)
  
file_path: pytorch/torch/distributed/algorithms/_comm_hooks/default_hooks.py
imports: import functools
  import torch
  import torch.distributed
  from typing import Optional
label_desc: Use image node_id 2 for calling the DefaultState obj's underlying member method code with example usage: obj._get_gradient_predivide_factor(world_size) and returns: float