def METHOD_NAME(analyzer) -> AnalyzerType:
    """Detects analyzer type from a string and returns an MSIWarp-compatible analyzer string"""
    analyzer = (analyzer or '').lower()
    if 'orbitrap' in analyzer:
        return 'orbitrap'
    if any(phrase in analyzer for phrase in ['fticr', 'ft-icr', 'ftms', 'ft-ms']):
        return 'ft-icr'
    if 'tof' in analyzer:
        return 'tof'
    raise AssertionError(f'Unrecognized analyzer type "{analyzer}"')