code: def _get_hyperparameter_solution_size(meta_parameters):
      
      # WARNING: meta_parameters is modified inline
  
      solution_size = 0
      for _, parameters in meta_parameters.iteritems():
          if parameters['type'] == 'discrete':
              # Binary encoding of discrete values -> log_2 N
              num_values = len(parameters['values'])
              binary_size = helpers.binary_size(num_values)
          elif parameters['type'] == 'int':
              # Use enough bits to cover range from min to max
              # + 1 to include max in range
              int_range = parameters['max'] - parameters['min'] + 1
              binary_size = helpers.binary_size(int_range)
          elif parameters['type'] == 'float':
              # Use enough bits to provide fine steps between min and max
              float_range = parameters['max'] - parameters['min']
              # * 1000 provides 1000 values between each natural number
              binary_size = helpers.binary_size(float_range * 1000)
          else:
              raise ValueError('Parameter type "{}" does not match known values'.
                               format(parameters['type']))
  
          # Store binary size with parameters for use in decode function
          parameters['binary_size'] = binary_size
  
          solution_size += binary_size
  
      return solution_size
docs: Determine size of binary encoding of parameters.
  
      Also adds binary size information for each parameter.