code: def _params_iter(C):
      """Returns dict of keyword args of a class or function C."""
      if inspect.isclass(C):
          return itertools.islice(  # exclude `self`
              inspect.signature(C.__init__).parameters.items(), 1, None
          )
  
      return inspect.signature(C).parameters.items()
  
imports: import dataclasses
  import inspect
  import itertools
  import sys
  import warnings
  from collections import Counter, defaultdict
  from enum import Enum
  from functools import partial
  from typing import Any, Callable, Dict, get_args, get_origin, List, Optional, Tuple, Type, TypeVar, Union
  from omegaconf import DictConfig, OmegaConf, open_dict
label_desc: Use image node_id 9 for calling a global function with example usage: _params_iter(C) and returns: inspect, itertools