def _pdf_url_to_filename(url: str) -> str:
    """
    Convert a PDF URL like 'https://www.mass.gov/doc/weekly-inmate-count-4202020/download'
    into a filename like 'weekly-inmate-count-4202020.pdf'
    """
    name_part = url[25:-9]
    return f"{name_part}.pdf"