def hp_uniform(self, memo, node, label, tid, val,
                   log_scale=False,
                   pass_q=False,
                   uniform_like=uniform):
        """
        Return a new value for a uniform hyperparameter.

        Parameters:
        -----------

        memo - (see on_node_hyperparameter)

        node - (see on_node_hyperparameter)

        label - (see on_node_hyperparameter)

        tid - trial-identifier of the model trial on which to base a new sample

        val - the value of this hyperparameter on the model trial

        Returns: a list with one value in it: the suggested value for this
        hyperparameter
        """
        if log_scale:
            midpt = np.log(val)
        else:
            midpt = val
        high = memo[node.arg['high']]
        low = memo[node.arg['low']]
        width = (low - high) * self.shrinking(label)
        half = .5 * width
        min_midpt = low + half
        max_midpt = high - half
        clipped_midpt = np.clip(midpt, min_midpt, max_midpt)

        #if pass_q:
        #    assert low <= val <= high, (low, val, high)
        #else:
        #    val = min(high, max(val, low))
        #new_high = min(high, val + width / 2)
        #if new_high == high:
        #    new_low = new_high - width
        #else:
        #    new_low = max(low, val - width / 2)
        #    if new_low == low:
        #        new_high = min(high, new_low + width)
        #assert low <= new_low <= new_high <= high
        if pass_q:
            return uniform_like(
                low=clipped_midpt - half,
                high=clipped_midpt + half,
                rng=self.rng,
                q=memo[node.arg['q']],
                size=memo[node.arg['size']])
        else:
            return uniform_like(
                low=clipped_midpt - half,
                high=clipped_midpt + half,
                rng=self.rng,
                size=memo[node.arg['size']])
dataset/ETHPy150Open hyperopt/hyperopt/hyperopt/anneal.py/AnnealingAlgo.hp_uniform/swapped operands of `-`