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 from_proto(cls, proto):
      hps = cls()
  
      space = []
      if isinstance(proto, protos.get_proto().HyperParameters.Values):
          # Allows passing in only values, space becomes `Fixed`.
          space.extend(
              hp_types.Fixed(
                  name, getattr(value, value.WhichOneof("kind"))
              )
              for name, value in proto.values.items()
          )
  
      else:
          space.extend(
              hp_types.Fixed.from_proto(fixed_proto)
              for fixed_proto in proto.space.fixed_space
          )
  
          space.extend(
              hp_types.Float.from_proto(float_proto)
              for float_proto in proto.space.float_space
          )
  
          space.extend(
              hp_types.Int.from_proto(int_proto)
              for int_proto in proto.space.int_space
          )
  
          space.extend(
              hp_types.Choice.from_proto(choice_proto)
              for choice_proto in proto.space.choice_space
          )
  
          space.extend(
              hp_types.Boolean.from_proto(boolean_proto)
              for boolean_proto in proto.space.boolean_space
          )
  
      hps.merge(space)
  
      if isinstance(proto, protos.get_proto().HyperParameters.Values):
          values = proto.values
      else:
          values = proto.values.values
      for name, val in values.items():
          hps.values[name] = getattr(val, val.WhichOneof("kind"))
  
      return hps
  
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 23 for calling the HyperParameters obj's underlying member method code with example usage: obj.from_proto(cls, proto) and returns: hps