code: def check_config(config, class_, strict):
      init_signature = inspect.signature(class_.__init__)
  
      for parameter_name in init_signature.parameters:
          if parameter_name == "self":
              continue
          elif parameter_name == "args" and strict:
              raise KeyError(
                  "Please do not use args in the class constructor of {}, "
                  "as it hides the real signature "
                  "and degrades the user experience. "
                  "If you have no alternative to *args, "
                  "use `strict=False` in check_metric_serialization.".format(
                      class_.__name__
                  )
              )
          elif parameter_name == "kwargs" and strict:
              raise KeyError(
                  "Please do not use kwargs in the class constructor of {}, "
                  "as it hides the real signature "
                  "and degrades the user experience. "
                  "If you have no alternative to **kwargs, "
                  "use `strict=False` in check_metric_serialization.".format(
                      class_.__name__
                  )
              )
          if parameter_name not in config:
              raise KeyError(
                  "The constructor parameter {} is not present in the config dict "
                  "obtained with `.get_config()` of {}. All parameters should be set to "
                  "ensure a perfect copy of the keras object can be obtained when "
                  "serialized.".format(parameter_name, class_.__name__)
              )
  
file_path: addons/tensorflow_addons/testing/serialization.py
imports: from typing import Union
  import inspect
  import numpy
  from tensorflow.keras.metrics import Metric
  import typeguard
label_desc: Use image node_id 2 for calling a global function with example usage: check_config(config, class_, strict) without return types