def status_for(self, code):
        """
        Returns the weather status related to the specified weather status
        code, if any is stored, ``None`` otherwise.

        :param code: the weather status code whose status is to be looked up
        :type code: int
        :returns: the weather status str or ``None`` if the code is not mapped
        """
        is_in = lambda start, end, n: True if start <= n <= end else False
        for status in self._code_ranges_dict:
            for _range in self._code_ranges_dict[status]:
                if is_in(_range['start'],_range['end'],code):
                    return status
        return None
def status_for ( self , code ) : is_in = lambda start , end , n : True if start <= n <= end else False for status in self . _code_ranges_dict : for _range in self . _code_ranges_dict [ status ] : if is_in ( _range [ 'start' ] , _range [ 'end' ] , code ) : return status return None
Returns the weather status related to the specified weather status
        code, if any is stored, ``None`` otherwise.

        :param code: the weather status code whose status is to be looked up
        :type code: int
        :returns: the weather status str or ``None`` if the code is not mapped