def format_gender(self, gender_string: str):
    'Attempts to find a matching gender for gender_string.\n        \n        Args:\n            gender_string (str): A gender for the word list or an alias of a gender.\n        \n        Returns:\n            The associated gender.\n        \n        Raises:\n            ValueError: `gender_string` does not match any gender or alias.\n        '
    gender_string = gender_string.lower()
    if (gender_string in self.structure['genders']):
        return gender_string
    if (gender_string in self.structure['aliases']):
        return self.structure['aliases'][gender_string]
    raise ValueError(f'Unknown gender: {gender_string}')
Attempts to find a matching gender for gender_string.

Args:
    gender_string (str): A gender for the word list or an alias of a gender.

Returns:
    The associated gender.

Raises:
    ValueError: `gender_string` does not match any gender or alias.
def format_gender(self, gender_string: str):
    'Attempts to find a matching gender for gender_string.\n        \n        Args:\n            gender_string (str): A gender for the word list or an alias of a gender.\n        \n        Returns:\n            The associated gender.\n        \n        Raises:\n            ValueError: `gender_string` does not match any gender or alias.\n        '
    gender_string = gender_string.lower()
    if (gender_string in self.structure['genders']):
        return gender_string
    if (gender_string in self.structure['aliases']):
        return self.structure['aliases'][gender_string]
    raise ValueError(f'Unknown gender: {gender_string}')