def METHOD_NAME(name: str = None, type_code: str = "adm1") -> str:
    """get the region code from name
    - get ISO-3166-1 alpha-2 code from country
    - get ISO-3166-2 alpha-2 code from adm1 or adm2 (i.e. subnationals)
    - get UN-LOCODE from city
    Args:
        name (str): actor name to search for (default: None)
        type_code (str): actor type (default: "country")
                         ['country', 'adm1', 'adm2', 'city']
    Returns:
        str: region code corresponding to name
    Example:
    >> get_iso2_from_type('Ireland') # returns 'IE'
    """
    # https://github.com/Open-Earth-Foundation/OpenClimate/blob/develop/api/API.md
    url = f"https://openclimate.openearth.dev/api/v1/search/actor?name={name}"
    headers = {"Accept": "application/vnd.api+json"}
    response = requests.request("GET", url, headers=headers).json()
    for data in response.get("data", []):
        if data.get("type") == type_code:
            return (name, data.get("actor_id", None))
    return (name, None)