Parameters:
         * module (torch.nn.Module) -- Root module, which may or
           may not be an "FSDP" module.
     * **root_only** (*bool*) -- Whether to return only FSDP root
       modules. (Default: "False")

  Returns:
     FSDP modules that are nested in the input "module".

  Return type:
     List[FullyShardedDataParallel]

static full_optim_state_dict(model, optim, optim_input=None, rank0_only=True, group=None)
  Consolidates the full optimizer state on rank 0 and returns it
  as a "dict" following the convention of
  "torch.optim.Optimizer.state_dict()", i.e. with keys ""state""
  and ""param_groups"". The flattened parameters in "FSDP" modules
  contained in "model" are mapped back to their unflattened
  parameters.

  Warning:

    This needs to be called on all ranks since it uses collective
    communications. However, if "rank0_only=True", then the state
