def compile_hierarchy_req_str_list(geo_list: dict, str_list: list) -> list:
    """Recursively go through geo config to get list ids and combine with their str.
        An example of hierarchial required geo ids would be:
        county subdivision:
        {
            '<state id>': {
                '<county id>': {
                    '<county subdivision id>': '<county subdivision name>'
                }

            }
        }
        Args:
            geo_list: Dict of geo ids required for a particular summary level.
            str_list: List API query prefix string for each level of dict.
        
        Returns:
            List of required geo strings to be added to API call.
    """
    ret_list = []
    for k, v in geo_list.items():
        if isinstance(v, dict):
            new_list = str_list.copy()
            new_list[1] = f'{str_list[0]}{k}{str_list[1]}'
            ret_list.extend(compile_hierarchy_req_str_list(v, new_list[1:]))
        else:
            ret_list.append(f'{str_list[0]}{k}')
    return ret_list