class_docstr: Container for both a hyperparameter space, and current values.
  
  A `HyperParameters` instance can be pass to `HyperModel.build(hp)` as an
  argument to build a model.
  
  To prevent the users from depending on inactive hyperparameter values, only
  active hyperparameters should have values in `HyperParameters.values`.
  
  Attributes:
      space: A list of `HyperParameter` objects.
      values: A dict mapping hyperparameter names to current values.
docstr: Registers a hyperparameter in this container.
  
  Args:
      hp: A `HyperParameter` instance.
      overwrite: Boolean, whether to overwrite the existing value with
          the default hyperparameter value.
  
  Returns:
      The value of the hyperparameter, or None if the hyperparameter is
      not active.
docstr_tok: ["Registers","a","hyperparameter","in","this","container",".","Args",":","hp",":","A","`","HyperParameter","`","instance",".","overwrite",":","Boolean",",","whether","to","overwrite","the","existing","value","with","the","default","hyperparameter","value",".","Returns",":","The","value","of","the","hyperparameter",",","or","None","if","the","hyperparameter","is","not","active","."]
code: def _register(self, hyperparameter, overwrite=False):
      """Registers a hyperparameter in this container.
  
      Args:
          hp: A `HyperParameter` instance.
          overwrite: Boolean, whether to overwrite the existing value with
              the default hyperparameter value.
  
      Returns:
          The value of the hyperparameter, or None if the hyperparameter is
          not active.
      """
      hp = hyperparameter
      self._validate_name(hp.name)
      # Copy to ensure this param can be serialized.
      hp = hp.__class__.from_config(hp.get_config())
      self._hps[hp.name].append(hp)
      self._space.append(hp)
      # Only add active values to `self.values`.
      if self.is_active(hp):
          # Use the default value only if not populated.
          if overwrite or hp.name not in self.values:
              self.values[hp.name] = hp.default
          return self.values[hp.name]
      return None
  
imports: import collections
  import contextlib
  import copy
  import six
  from keras_tuner import protos
  from keras_tuner.api_export import keras_tuner_export
  from keras_tuner.engine import conditions
  from keras_tuner.engine.hyperparameters import hp_types
  from keras_tuner.engine.hyperparameters import hyperparameter
label_desc: Use image node_id 8 for calling the HyperParameters obj's underlying member method code with example usage: obj._register(hyperparameter, overwrite) and returns: None, self