docstr: Ensure provided input parameters are properly formatted
docstr_tok: ["Ensure","provided","input","parameters","are","properly","formatted"]
code: def validate_keras_params(self):
      """Ensure provided input parameters are properly formatted"""
      #################### Check Keras Import Hooks ####################
      necessary_import_hooks = ["keras_layer"]
      for hook in necessary_import_hooks:
          if hook not in G.import_hooks:
              raise ImportError(
                  f"Must establish {hook!r} import hook before importing Keras"
              )
  
      #################### build_fn ####################
      if not isinstance(self.initialization_params, dict):
          raise TypeError(
              f"initialization_params must be dict not\n{self.initialization_params}"
          )
      if "build_fn" not in self.initialization_params.keys():
          raise KeyError(
              f"Need initialization_params['build_fn']\n{self.initialization_params}"
          )
  
      bad_extra_keys = {
          "build_fn",
          "input_shape",
          "input_dim",
          "validation_data",
          "validation_split",
          "x",
          "y",
      }
      bad_keys_found = bad_extra_keys.intersection(self.extra_params)
      if len(bad_keys_found) > 0:
          raise KeyError(
              f"`extra_params` may not contain the following keys: {bad_keys_found}"
          )
  
imports: from hyperparameter_hunter.sentinels import locate_sentinels
  from hyperparameter_hunter.settings import G
  from contextlib import suppress
  import inspect
  import sys
  import warnings
  import sklearn.utils
label_desc: Use image node_id 5 for calling the KerasModel obj's underlying member method code with example usage: obj.validate_keras_params() without return types