def import_moderator(app):
    '''
    Import moderator module and register all models it contains with moderation
    '''
    from django.utils.importlib import import_module
    import imp

    try:
        app_path = import_module(app).__path__
    except __HOLE__:
        return None

    try:
        imp.find_module('moderator', app_path)
    except ImportError:
        return None

    module = import_module("%s.moderator" % app)

    return module
dataset/ETHPy150Open dominno/django-moderation/moderation/helpers.py/import_moderator