code: def receive_trial_result(self, parameter_id, parameters, value):
          
          value = extract_scalar_reward(value)
          if self.optimize_mode == OptimizeMode.Maximize:
              value = -value
  
          logger.info("Received trial result.")
          logger.info("value is :" + str(value))
          logger.info("parameter is : " + str(parameters))
  
          # parse parameter to sample_x
          sample_x = [0 for i in range(len(self.key_order))]
          for key in parameters:
              idx = self.key_order.index(key)
              sample_x[idx] = parameters[key]
  
          # parse value to sample_y
          temp_y = []
          if sample_x in self.samples_x:
              idx = self.samples_x.index(sample_x)
              temp_y = self.samples_y[idx]
              temp_y.append(value)
              self.samples_y[idx] = temp_y
  
              # calculate y aggregation
              median = get_median(temp_y)
              self.samples_y_aggregation[idx] = [median]
          else:
              self.samples_x.append(sample_x)
              self.samples_y.append([value])
  
              # calculate y aggregation
              self.samples_y_aggregation.append([value])
docs: Tuner receive result from trial.
  
          Parameters
          ----------
          parameter_id : int
          parameters : dict
          value : dict/float
              if value is dict, it should have "default" key.