def METHOD_NAME(pipette_name_list: List[str]) -> PipetteGenerationType:
    """Convert a string generation name to a py:obj:PipetteGenerationType.
    Args:
        pipette_name_list (List[str]): A list of strings from the separated by `_`
        py:data:PipetteName or py:data:PipetteModel.
    Returns:
        PipetteGenerationType: A pipette version object.
    """
    if "flex" in pipette_name_list or "3." in pipette_name_list[-1]:
        return PipetteGenerationType.FLEX
    elif "gen2" in pipette_name_list or "2." in pipette_name_list[-1]:
        return PipetteGenerationType.GEN2
    else:
        return PipetteGenerationType.GEN1