@staticmethod
def check_imported(module: str) -> bool:
    'Check whether the provide module can be imported (package installed).\n\n        Args:\n            module: The name of the module to check availability.\n\n        Returns:\n            bool: True if the module can be imported, False otherwise.\n        '
    try:
        del sys.modules[module]
    except (AttributeError, KeyError):
        pass
    find_spec = importlib.util.find_spec(module)
    found = (find_spec is not None)
    if (found is True):
        try:
            if ('dist-packages' in find_spec.origin):
                found = False
        except TypeError:
            pass
        try:
            if ('site-packages' in find_spec.origin):
                found = False
        except TypeError:
            pass
    return found
Check whether the provide module can be imported (package installed).

Args:
    module: The name of the module to check availability.

Returns:
    bool: True if the module can be imported, False otherwise.
@staticmethod
def check_imported(module: str) -> bool:
    'Check whether the provide module can be imported (package installed).\n\n        Args:\n            module: The name of the module to check availability.\n\n        Returns:\n            bool: True if the module can be imported, False otherwise.\n        '
    try:
        del sys.modules[module]
    except (AttributeError, KeyError):
        pass
    find_spec = importlib.util.find_spec(module)
    found = (find_spec is not None)
    if (found is True):
        try:
            if ('dist-packages' in find_spec.origin):
                found = False
        except TypeError:
            pass
        try:
            if ('site-packages' in find_spec.origin):
                found = False
        except TypeError:
            pass
    return found