def format_program_client_stats(row, prefix):
    """
    Given a program in the facility DF (specified by string prefix),
    format the client stats (gender, pets, ADA, EMS calls/visits).

    Parameters:
    ===========

    row: pandas.Series
        The row of the df to format
    prefix: str
        The prefix for all the stats entries (e.g., 'trailers_', 'isolation_', etc)

    Returns
    =======

    An HTML string of the formatted client stats.
    """
    men = row[prefix + "MALE"] + row[prefix + "TRANSGENDER_F_TO_M"]
    women = row[prefix + "FEMALE"] + row[prefix + "TRANSGENDER_M_TO_F"]
    nonbinary = (
        row[prefix + "DECLINED"] + row[prefix + "OTHER"] + row[prefix + "UNDEFINED"]
    )
    pets = row[prefix + "totalPets"]
    ada = row[prefix + "totalAda"]
    ems_calls = row[prefix + "EMS_CALL"]
    ems_visits = row[prefix + "EMS_VISIT"]
    return f"""
        <p style="margin-top:2px; margin-bottom: 2px; margin-left: 16px">
            Women: {women}
        </p>
        <p style="margin-top:2px; margin-bottom: 2px; margin-left: 16px">
            Men: {men}
        </p>
        <p style="margin-top:2px; margin-bottom: 2px; margin-left: 16px">
            Nonbinary/other/declined: {nonbinary}
        </p>
        <p style="margin-top:2px; margin-bottom: 2px; margin-left: 16px">
            Pets: {pets}
        </p>
        <p style="margin-top:2px; margin-bottom: 2px; margin-left: 16px">
            Clients with ADA needs: {ada}
        </p>
        <p style="margin-top:2px; margin-bottom: 2px; margin-left: 16px">
            EMS calls (last 24 hours): {ems_calls}
        </p>
        <p style="margin-top:2px; margin-bottom: 2px; margin-left: 16px">
            EMS visits (last 24 hours): {ems_visits}
        </p>
    """