import importlib


def import_to_python(import_str):
    """Given a string 'a.b.c' return object c from a.b module.

    :param str import_str: a path like a.b.c.
    """
    mod_name, obj_name = import_str.rsplit('.', 1)
    obj = getattr(importlib.import_module(mod_name), obj_name)
    return obj