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.
code: def to_proto(self):
      fixed_space = []
      float_space = []
      int_space = []
      choice_space = []
      boolean_space = []
      for hp in self.space:
          if isinstance(hp, hp_types.Fixed):
              fixed_space.append(hp.to_proto())
          elif isinstance(hp, hp_types.Float):
              float_space.append(hp.to_proto())
          elif isinstance(hp, hp_types.Int):
              int_space.append(hp.to_proto())
          elif isinstance(hp, hp_types.Choice):
              choice_space.append(hp.to_proto())
          elif isinstance(hp, hp_types.Boolean):
              boolean_space.append(hp.to_proto())
          else:
              raise ValueError(f"Unrecognized HP type: {hp}")
  
      values = {}
      for name, value in self.values.items():
          if isinstance(value, bool):
              val = protos.get_proto().Value(boolean_value=value)
          elif isinstance(value, float):
              val = protos.get_proto().Value(float_value=value)
          elif isinstance(value, six.integer_types):
              val = protos.get_proto().Value(int_value=value)
          elif isinstance(value, six.string_types):
              val = protos.get_proto().Value(string_value=value)
          else:
              raise ValueError(f"Unrecognized value type: {value}")
          values[name] = val
  
      return protos.get_proto().HyperParameters(
          space=protos.get_proto().HyperParameters.Space(
              fixed_space=fixed_space,
              float_space=float_space,
              int_space=int_space,
              choice_space=choice_space,
              boolean_space=boolean_space,
          ),
          values=protos.get_proto().HyperParameters.Values(
              values=values
          ),
      )
  
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 24 for calling the HyperParameters obj's underlying member method code with example usage: obj.to_proto() and returns: protos