def _module_available(module_path: str) -> bool:
    "\n    Check if a path is available in your environment\n\n    >>> _module_available('os')\n    True\n    >>> _module_available('bla.bla')\n    False\n    "
    try:
        return (find_spec(module_path) is not None)
    except AttributeError:
        return False
    except ModuleNotFoundError:
        return False
Check if a path is available in your environment

>>> _module_available('os')
True
>>> _module_available('bla.bla')
False
def _module_available(module_path: str) -> bool:
    "\n    Check if a path is available in your environment\n\n    >>> _module_available('os')\n    True\n    >>> _module_available('bla.bla')\n    False\n    "
    try:
        return (find_spec(module_path) is not None)
    except AttributeError:
        return False
    except ModuleNotFoundError:
        return False