def get_title(obj, objid):
    """
    Returns title value of the object with given ID.

    :param obj: Structure containing YAML object ( nested lists / dicts ).
    :param objid: YAML ID of given node.
    :return: Title of given ID.
    """

    result = None

    if isinstance(obj, dict):
        for key, val in obj.items():
            if val == objid:
                result = obj['title']
            elif isinstance(val, list) or isinstance(val, dict):
                retval = get_title(val, objid)
                if retval is not None:
                    result = retval
    elif isinstance(obj, list):
        for elem in obj:
            if isinstance(elem, list) or isinstance(elem, dict):
                retval = get_title(elem, objid)
                if retval is not None:
                    result = retval
    return result