def import_(module, objects=None, py2=None):
    if not PY2:
        mod = __import__(module, fromlist=['*'])
    else:
        path = modules_mapping.get(module)
        if not path:
            raise Exception("Can't find the module %s in mappings." % module)

        if objects:
            if not isinstance(objects, (list, tuple)):
                objects = [objects]

            r = []
            for x in objects:
                m = path.get(x)
                if not m:
                    raise Exception("Can't find the object %s in %s." % (x, path))
                mod = __import__(m, fromlist=['*'])
                r.append(getattr(mod, x))
            if len(r) > 1:
                return tuple(r)
            else:
                return r[0]

        else:
            if isinstance(path, (dict, list)):
                if not py2:
                    raise Exception("You should give py2 parameter to enable import from py2.")
                path = py2
            mod = __import__(path, fromlist=['*'])

            return mod
:param module: py3 compatiable module path
dataset/ETHPy150Open limodou/uliweb/uliweb/utils/_compat.py/import_