def METHOD_NAME(soup, logger: Logger):
    """
    Gets the total generation by type from state powerplants (MW).
    Data is from the table titled GENERATION OF HP(Z).
    """
    table_name = "GENERATION OF HP(Z)"
    gen = {GenType.HYDRO.value: 0.0, GenType.UNKNOWN.value: 0.0}
    # Read all rows except the last (Total).
    for row in get_table_rows(soup, "table_5", table_name)[:-1]:
        try:
            cols = row.find_all("td")
            # Column 1: plant name, column 2: current generation.
            gen_type = PLANT_NAMES_TO_TYPES[cols[0].text]
            gen[gen_type.value] += float(cols[1].text)
        except (AttributeError, KeyError, IndexError, ValueError):
            logger.error(
                f"Error importing data from row: {row}", extra={"key": ZONE_KEY}
            )
    return gen