'Will attempt to retrieve the .tracker file from disk or github. Returns the parsed XML.
:param tracker_config_file: URL or path to .tracker file
:return: parsed XML'

@classmethod
def retrieve_tracker_config(cls, tracker_config_file):

    base_url = u'https://raw.githubusercontent.com/autodl-community/autodl-trackers/master/'
    tracker_config_file = os.path.expanduser(tracker_config_file)
    if os.path.exists(tracker_config_file):
        log.debug(u'Found    tracker    file:    %s', tracker_config_file)
        return cls.read_tracker_config(tracker_config_file)
    if (not tracker_config_file.endswith(u'.tracker')):
        tracker_config_file += u'.tracker'
        if os.path.exists(tracker_config_file):
            log.debug(u'Found    tracker    file:    %s', tracker_config_file)
            return cls.read_tracker_config(tracker_config_file.rsplit(u'.tracker')[0])
    if os.path.exists(os.path.dirname(tracker_config_file)):
        base_dir = os.path.dirname(tracker_config_file)
    else:
        base_dir = os.path.abspath(os.path.join(manager.config_base, u'trackers'))
    tracker_name = os.path.basename(tracker_config_file)
    tracker_name_no_ext = os.path.splitext(tracker_name)[0]
    if os.path.exists(base_dir):
        files = os.listdir(base_dir)
        for f in files:
            if (tracker_name_no_ext.lower() in f.lower()):
                found_path = os.path.join(base_dir, f)
                log.debug(u'Found    tracker    file:    %s', found_path)
                return cls.read_tracker_config(found_path)
    if (not os.path.exists(base_dir)):
        try:
            os.mkdir(base_dir)
        except IOError as e:
            raise TrackerFileError(e)
    log.info(u'Tracker    file    not    found    on    disk.    Attempting    to    fetch    tracker    config    file    from    Github.')
    tracker = None
    try:
        tracker = requests.get((base_url + tracker_config_file))
    except (requests.RequestException, IOError):
        pass
    if (not tracker):
        try:
            log.debug(u'Trying    to    search    list    of    tracker    files    on    Github')
            trackers = requests.get(u'https://api.github.com/repos/autodl-community/autodl-trackers/git/trees/master?recursive=1').json().get(u'tree', [])
            for t in trackers:
                name = t.get(u'path', u'')
                if ((not name.endswith(u'.tracker')) or (name.lower() != tracker_name.lower())):
                    continue
                tracker = requests.get((base_url + name))
                tracker_name = name
                break
        except (requests.RequestException, IOError) as e:
            raise TrackerFileError(e)
    if (not tracker):
        raise TrackerFileError((u'Unable    to    find    %s    on    disk    or    Github.    Did    you    spell    it    correctly?' % tracker_config_file))
    save_path = os.path.join(base_dir, tracker_name)
    with io.open(save_path, u'wb') as tracker_file:
        for chunk in tracker.iter_content(8192):
            tracker_file.write(chunk)
    return cls.read_tracker_config(save_path)
