def handle_includes(defns):
    """Recursive handling of includes for any input list of defns.
    The assumption here is that when an include is handled by the
    pyyaml reader, it adds them as a list, which is stands apart from the rest
    of the expected YAML definitions.
    """
    newdefns = []
    for d in defns:
        if isinstance(d, list):
            newdefns.extend(handle_includes(d))
        else:
            newdefns.append(d)

    return newdefns