import importlib


def _import(module_path):
    """Import module path as python object.

    :param module_path: module path of the python object
    :returns: python object

    """
    parts = module_path.split('.')
    module_name, name = '.'.join(parts[:-1]), parts[-1]

    return getattr(importlib.import_module(module_name), name)