code: def _compute_hparam_info_from_values(self, name, values):
      
      # Figure out the type from the values.
      # Ignore values whose type is not listed in api_pb2.DataType
      # If all values have the same type, then that is the type used.
      # Otherwise, the returned type is DATA_TYPE_STRING.
      result = api_pb2.HParamInfo(name=name, type=api_pb2.DATA_TYPE_UNSET)
      distinct_values = set(
          _protobuf_value_to_string(v) for v in values if _protobuf_value_type(v))
      for v in values:
        v_type = _protobuf_value_type(v)
        if not v_type:
          continue
        if result.type == api_pb2.DATA_TYPE_UNSET:
          result.type = v_type
        elif result.type != v_type:
          result.type = api_pb2.DATA_TYPE_STRING
        if result.type == api_pb2.DATA_TYPE_STRING:
          # A string result.type does not change, so we can exit the loop.
          break
  
      # If we couldn't figure out a type, then we can't compute the hparam_info.
      if result.type == api_pb2.DATA_TYPE_UNSET:
        return None
  
      # If the result is a string, set the domain to be the distinct values if
      # there aren't too many of them.
      if (result.type == api_pb2.DATA_TYPE_STRING
          and len(distinct_values) <= self._max_domain_discrete_len):
        result.domain_discrete.extend(distinct_values)
  
      return result
docs: Builds an HParamInfo message from the hparam name and list of values.
  
      Args:
        name: string. The hparam name.
        values: list of google.protobuf.Value messages. The list of values for the
          hparam.
  
      Returns:
        An api_pb2.HParamInfo message.