def get_module_callables(mod, ignore=None):
    if isinstance(mod, basestring):
        mod = sys.modules[mod]
    types, funcs = {}, {}
    for attr_name in dir(mod):
        if ignore and ignore(attr_name):
            continue
        try:
            attr = getattr(mod, attr_name)
        except Exception:
            continue
        try:
            attr_mod_name = attr.__module__
        except AttributeError:
            continue
        if attr_mod_name != mod.__name__:
            continue
        if isinstance(attr, type):
            types[attr_name] = attr
        elif callable(attr):
            funcs[attr_name] = attr
    return types, funcs
Check a file for missing/misconfigure timeouts.
dataset/ETHPy150Open mahmoud/boltons/boltons/funcutils.py/get_module_callables--crossover with--dataset/ETHPy150Open uber/py-look-for-timeouts/py_look_for_timeouts/main.py/check