def METHOD_NAME(self, response, level):
    soup = BeautifulSoup(response, features="html.parser")
    select_content = soup.find_all("select", id=f"strukturEbene{level}")
    soup = BeautifulSoup(str(select_content), features="html.parser")
    options_content = soup.find_all("option")
    level_ids = {}
    for option in options_content:
        # Ignore the "Bitte wählen..."
        if option.get("value") != "0":
            level_ids[option.text] = option.get("value")
    if level_ids == {}:
        raise Exception(f"Error: Level {level} Dictionary empty")
    if self._districts[level - 1] not in level_ids:
        raise Exception(
            f"Error: District {self._districts[level]} is not in the dictionary: {level_ids}"
        )
    return level_ids[self._districts[level - 1]]