<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def load_from_cache(path=user_path):
    '''
    Try to load category ranges from userlevel cache file.

    :param path: path to userlevel cache file
    :type path: str
    :returns: category ranges dict or None
    :rtype: None or dict of RangeGroup
    '''
    if not path:
        return
    try:
        with open(path, 'rb') as f:
            dversion, mversion, data = pickle.load(f)
        if dversion == data_version and mversion == module_version:
            return data
    except (FileNotFoundError, ValueError, EOFError):
        pass