code: def unpack_kwargs(
      kwarg_keys: Tuple[str, ...], flat_args: Tuple[Any, ...]
  ) -> Tuple[Tuple[Any, ...], Dict[str, Any]]:
      """See pack_kwargs."""
      assert len(kwarg_keys) <= len(
          flat_args
      ), f"too many keys {len(kwarg_keys)} vs. {len(flat_args)}"
      if len(kwarg_keys) == 0:
          return flat_args, {}
      args = flat_args[: -len(kwarg_keys)]
      kwargs = {
          k: v
          for k, v in zip(kwarg_keys, flat_args[-len(kwarg_keys) :])
      }
      return args, kwargs
  
file_path: fairscale/fairscale/internal/containers.py
imports: from collections import OrderedDict
  from typing import Any, Callable, Dict, List, NamedTuple, Optional, Set, Tuple, Union, cast
  import numpy
  import torch
  from torch.nn.utils.rnn import PackedSequence
label_desc: Use image node_id 6 for calling a global function with example usage: unpack_kwargs(kwarg_keys, flat_args) and returns: args,  kwargs, flat_args,  dict