class_docstr: A parameter that is initialized from a list of parameters and can be
  turned into a list of views as needed.
class_docstr_tok: ["A","parameter","that","is","initialized","from","a","list","of","parameters","and","can","be","turned","into","a","list","of","views","as","needed","."]
docstr: Use by pickle to set the internal states.
docstr_tok: ["Use","by","pickle","to","set","the","internal","states","."]
code: def __setstate__(self, state: Tuple[Any, Any, Any, Any]) -> None:
      """Use by pickle to set the internal states."""
      (
          self._param_numels,
          self._param_shapes,
          self._param_infos,
          self._shared_param_infos,
      ) = state
      assert self.numel() <= sum(
          self._param_numels
      ), f"Incorrect pickling {self.numel()} vs. {sum(self._param_numels)}"
  
imports: from contextlib import contextmanager
  from itertools import chain
  import typing
  from typing import TYPE_CHECKING, Any, Dict, Generator, Iterator, List, Mapping, NamedTuple, Optional, Sequence, Set, Tuple, Union, cast
  import torch
  from torch import Tensor
  import torch.nn
  from fairscale.internal.state_dict import replace_by_prefix_
label_desc: Use image node_id 5 for calling the FlatParameter obj's underlying member method code with example usage: obj.__setstate__(state) without return types