import re


def clean_zips(zip_code: str) -> str:
    """Helper function to format input zip codes for input in the PD&R API.

    Parameters
    ----------
    zip : A string
        The zip code we want to clean up.

    Returns
    -------
    str
    """

    # Extract the first five digits from the input
    res = re.search(r"^\d{5}", zip_code)
    return res.group() if res != None else "00000"