code: def infer_constructor_params(
      cls: Type[T],
      constructor: Union[Callable[..., T], Callable[[T], None]] = None,
  ) -> Dict[str, inspect.Parameter]:
      if constructor is None:
          constructor = cls.__init__
      return infer_method_params(cls, constructor)
  
imports: import collections.abc
  from copy import deepcopy
  from pathlib import Path
  from typing import Any, Callable, cast, Dict, Iterable, List, Mapping, Set, Tuple, Type, TypeVar, Union, Optional
  import inspect
  import logging
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.lazy import Lazy
  from allennlp.common.params import Params
label_desc: Use image node_id 6 for calling a global function with example usage: infer_constructor_params(cls, constructor) and returns: infer_method_params