import pathlib


def get_file_extension(filename):
    """
    Reliably determine relevant file extension of archive

    >>> get_file_extension("/tmp/foo_v3.8.2_linux_amd64.tgz")
    '.tgz'
    >>> get_file_extension("/tmp/foo_v1.2.3_darwin.1.212.tar.gz")
    '.tar.gz'
    >>> get_file_extension("/tmp/2020.12.31_windows.1.007.zip")
    '.zip'
    """
    ext_list = pathlib.Path(filename).suffixes
    good_exts = [_ for _ in ext_list[-2:]
                 if 3 <= len(_) <= 4 and _[1:].isalpha()]
    return ''.join(good_exts)