def _get_kwarg_install_mode(self, kwargs):
    if (kwargs.get('install_mode', None) is None):
        return None
    install_mode = []
    mode = mesonlib.typeslistify(kwargs.get('install_mode', []), (str, int))
    for m in mode:
        if (m is False):
            m = None
        install_mode.append(m)
    if (len(install_mode) > 3):
        raise InvalidArguments('Keyword argument install_mode takes at most 3 arguments.')
    if ((len(install_mode) > 0) and (install_mode[0] is not None) and (not isinstance(install_mode[0], str))):
        raise InvalidArguments('Keyword argument install_mode requires the permissions arg to be a string or false')
    return FileMode(*install_mode)
def _get_kwarg_install_mode(self, kwargs):
    if (kwargs.get('install_mode', None) is None):
        return None
    install_mode = []
    mode = mesonlib.typeslistify(kwargs.get('install_mode', []), (str, int))
    for m in mode:
        if (m is False):
            m = None
        install_mode.append(m)
    if (len(install_mode) > 3):
        raise InvalidArguments('Keyword argument install_mode takes at most 3 arguments.')
    if ((len(install_mode) > 0) and (install_mode[0] is not None) and (not isinstance(install_mode[0], str))):
        raise InvalidArguments('Keyword argument install_mode requires the permissions arg to be a string or false')
    return FileMode(*install_mode)