Is the module of the required type?

        :param module_type: module type to check
        :type: str
        :return: True / False
345256
def is_a_module(self, module_type):
        
        if hasattr(self, 'type'):
            return module_type in self.type
        return module_type in self.module_types
20669
def is_mod_function(mod, fun):
    
    return inspect.isfunction(fun) and inspect.getmodule(fun) == mod
1227361
def verify(self):
        
        with ffi.OutputString() as outmsg:
            if ffi.lib.LLVMPY_VerifyModule(self, outmsg):
                raise RuntimeError(str(outmsg))
1138901
def _get_all(self, _type):
        
        if _type not in self.modules:
            raise ValueError("No such module, %s" % _type)
        if not self.insts_implementing.get(_type, None):
            raise ValueError("No instance implementing %s" % _type)
        return self.insts_implementing[_type]
214493
def _is_dynamic(module):
    
    # Quick check: module that have __file__ attribute are not dynamic modules.
    if hasattr(module, '__file__'):
        return False

    if hasattr(module, '__spec__'):
        return module.__spec__ is None
    else:
        # Backward compat for Python 2
        import imp
        try:
            path = None
            for part in module.__name__.split('.'):
                if path is not None:
                    path = [path]
                f, path, description = imp.find_module(part, path)
                if f is not None:
                    f.close()
        except ImportError:
            return True
        return False
603232
def is_skipped_module(self, module_name):
        
        if module_name is None:
            return False
        return super(Pdb, self).is_skipped_module(module_name)
885269
def is_tuple(type_: Type[Any]) -> bool:
    '''
    
    '''
    if HAS_TUPLEARGS:
        # The tuple, Tuple thing is a difference between 3.6 and 3.7
        # In 3.6 and before, Tuple had an __extra__ field, while Tuple[something]
        # would have the normal __origin__ field.
        #
        # Those apply for Dict, List, Set, Tuple
        return _generic_type_check(type_, tuple, Tuple)
    else:
        # Old python
        return _issubclass(type_, Tuple) and _issubclass(type_, tuple) == False
24043
def module_is_imported(modname, scope=None):
    """"""
    # return early if modname is not even cached
    if not module_is_in_cache(modname):
        return False

    if scope is None:  # use globals() of the caller by default
        scope = inspect.stack()[1][0].f_globals

    for m in scope.values():
        if isinstance(m, type(sys)) and m.__name__ == modname:
            return True

    return False
545924
def _get_correct_module(mod):
    

    module_location = getattr(
        mod, 'leonardo_module_conf',
        getattr(mod, "LEONARDO_MODULE_CONF", None))
    if module_location:
        mod = import_module(module_location)

    elif hasattr(mod, 'default_app_config'):
        # use django behavior
        mod_path, _, cls_name = mod.default_app_config.rpartition('.')
        _mod = import_module(mod_path)
        config_class = getattr(_mod, cls_name)
        # check if is leonardo config compliant
        if _is_leonardo_module(config_class):
            mod = config_class

    return mod
66563
def _is_module_included(self, module):
        
        if module in self.exclude_modules:
            return False

        if self.include_modules is None:
            return True

        return module in self.include_modules
775413
def types_from_module(pb_module):
    '''
    
    '''
    types = pb_module.DESCRIPTOR.message_types_by_name
    return [getattr(pb_module, name) for name in types]
140762
function checkModule(pth, cb) {
  checkStrider(pth, function(err, config){
    if (err) return cb(err);
    if (config){
      config.dir = pth;
      return cb(null, config);
    }
    checkPackageJson(pth, function(err, config){
      if (err) return cb(err);
      if (config){
        config.dir = pth;
        return cb(null, config);
      }
      return cb(null, false);
    });
  });
}
1324780
def is_builtin_type(tp):
    
    return hasattr(__builtins__, tp.__name__) and tp is getattr(__builtins__, tp.__name__)
820783
def get_module_path(exc_type):
    
    module = inspect.getmodule(exc_type)
    return "{}.{}".format(module.__name__, exc_type.__name__)
405996
def is_mod_class(mod, cls):
    
    return inspect.isclass(cls) and inspect.getmodule(cls) == mod
1076822
def is_module_loaded(module):
    """"""
    matches = re.findall('^%s[ ]+' % module, lsmod(), re.M)
    return len(matches) > 0
1301057
def check_type(*args, **kwargs):
    ''' 
    '''
    args = tuple(x if isinstance(x, collections.Iterable) else (x,) for x in args)
    kwargs = {x: kwargs[x] if isinstance(kwargs[x], collections.Iterable) else (kwargs[x],) for x in kwargs}

    def decorate(func):
        types = args
        kwtypes = kwargs
        gi = "Got <{}> instead"
        errmsg1 = "to be of type <{}>. " + gi
        errmsg2 = "to be one of type ({}). " + gi
        errar = "{}:{} expected '{}' "
        errkw = "{}:{} expected {} "

        def check(*ar, **kw):
            line = inspect.getouterframes(inspect.currentframe())[1][2]
            fname = os.path.basename(inspect.getouterframes(inspect.currentframe())[1][1])

            for arg, type_ in zip(ar, types):
                if type(arg) not in type_:
                    if len(type_) == 1:
                        raise TypeError((errar + errmsg1).format(fname, line, arg, type_[0].__name__,
                                                                 type(arg).__name__))
                    else:
                        raise TypeError((errar + errmsg2).format(fname, line, arg,
                                                                 ', '.join('<%s>' % x.__name__ for x in type_),
                                                                 type(arg).__name__))
            for kwarg in kw:
                if kwtypes.get(kwarg, None) is None:
                    continue
                if type(kw[kwarg]) not in kwtypes[kwarg]:
                    if len(kwtypes[kwarg]) == 1:
                        raise TypeError((errkw + errmsg1).format(fname, line, kwarg, kwtypes[kwarg][0].__name__,
                                                                 type(kw[kwarg]).__name__))
                    else:
                        raise TypeError((errkw + errmsg2).format(
                            fname,
                            line,
                            kwarg,
                            ', '.join('<%s>' % x.__name__ for x in kwtypes[kwarg]),
                            type(kw[kwarg]).__name__)
                        )

            return func(*ar, **kw)

        return check

    return decorate