def translate_masks(modifiers: list[str]) -> int:
    """
    Translate a modifier mask specified as a list of strings into an or-ed
    bit representation.
    """
    masks = []
    for i in modifiers:
        try:
            masks.append(ModMasks[i.lower()])
        except KeyError as e:
            raise XCBQError(f"Unknown modifier: {i}") from e
    if masks:
        return functools.reduce(operator.or_, masks)
    else:
        return 0

    Translate a modifier mask specified as a list of strings into an or-ed
    bit representation.
    
libqtile/backend/x11/xcbq.py