def get_excluded_hpo_ids_str(excluded_hpo_ids):
    """
    Formats list of hpo_ids or None to add to bq script, adds empty hpo_id

    :param excluded_hpo_ids: List output by args parser or None
    :return: String of hpo_ids enclosed in single quotes along with empty hpo_ids
    """
    if excluded_hpo_ids is None:
        excluded_hpo_ids = []
    # use uppercase for all hpo_ids as is in the table
    excluded_hpo_ids = [hpo_id.upper() for hpo_id in excluded_hpo_ids]
    # exclude empty site since lookup table contains it
    excluded_hpo_ids.append('')
    excluded_hpo_ids_str = ', '.join(
        [f"'{hpo_id}'" for hpo_id in excluded_hpo_ids])
    return excluded_hpo_ids_str