from typing import Union
import zipfile


def extract_zipped_aq_file(
    dir: str,
    aq_zip_name: str,
    aq_file_name: str = 'allPollutants'
) -> Union[str, None]:
    """Extracts AQ file from zip archive.
    Returns the name of the extracted file (if found) or None.
    """
    zip_archive = zipfile.ZipFile(fr'{dir}{aq_zip_name}', 'r')

    # loop over files in zip archive
    for file_name in zip_archive.namelist():
        if aq_file_name in file_name:
            zip_archive.extract(file_name, dir)
            return file_name