code: def initialize_optimizer_state(opt: torch.optim.Optimizer):
      for param_group in opt.param_groups:
          for param in param_group["params"]:
              if param.grad is None:
                  (0 * param.sum()).backward()
      opt.step()
  
imports: from concurrent.futures import ThreadPoolExecutor
  from contextlib import nullcontext
  from itertools import chain
  from threading import Event, Lock
  from typing import Dict, Iterator, Optional, Sequence
  import torch
  from hivemind.averaging import DecentralizedAverager
  from hivemind.compression import CompressionInfo, TensorRole
  from hivemind.utils import get_logger, nested_flatten, nested_pack
label_desc: Use image node_id 1 for calling a global function with example usage: initialize_optimizer_state(opt) without return types