def value_for(number, config_dict):
    """
    Help function to find key in config dict.

    :param number: int, the number to find range key.
    :param config_dict: dict, keys are tuple to define the range.
    :return: tuple, keys.

    Usage::
        >>> value_for(0, ODER_STRATEGY)[(0, 3)]
        'same'
        >>> value_for(4, ODER_STRATEGY[(1, 1)])
        'plus'
        >>> value_for(3, ODER_STRATEGY[(0, 0)])
        'same'
        >>> value_for(-1, ODER_STRATEGY)
        Traceback (most recent call last):
        ...
        AttributeError: Can not find the range for number in the config.
    """
    for key in config_dict.iterkeys():
        start, end = key
        if (start is None and end is None) or (start is None and number <= end) or \
                (end is None and number >= start) or (start <= number <= end):
            return config_dict[key]
    raise AttributeError('Can not find the range for number in the config.')