def get_handler_module(module):
    if not module:
        return MarkupHandler
        
    mod, f, i, fn = None, None, None, None
    msplit = module.split(".")
    if len(msplit) == 1:
        mod = msplit[0]
    else:
        f = msplit[:-1]
        i = msplit[-1:]
        fn = ".".join(f)
        
    if mod:
        try:
            return __import__(mod)
        except __HOLE__:
            return MarkupHandler
    else:
        try:
            mod = __import__(fn, fromlist=f)
            return getattr(mod, i[0])
        except:
            return MarkupHandler
dataset/ETHPy150Open callowayproject/django-supertagging/supertagging/markup.py/get_handler_module