def _get_object_from_classname(classname, data):
    """ Returns an object instance for given classname and data dictionary.

    Args:
        classname (str): Full classname as string including the modules, e.g. repo.Y if class Y is defined in module repo.
        data (dict): dictionary of data used to initialize the object instance.

    Returns:
        [type] -- Instance object of class.
    """

    parts = classname.split('.')
    module = ".".join(parts[:-1])
    m = __import__(module)
    for comp in parts[1:]:
        m = getattr(m, comp)
    result = m(**data)  # ._create_from_dict(**data)
    return result