def get_version(iterable) -> str:
    """
    Get the version of the WDL document.

    :param iterable: An iterable that contains the lines of a WDL document.
    :return: The WDL version used in the workflow.
    """
    if isinstance(iterable, str):
        iterable = iterable.split('\n')

    for line in iterable:
        line = line.strip()
        # check if the first non-empty, non-comment line is the version statement
        if line and not line.startswith('#'):
            if line.startswith('version '):
                return line[8:].strip()
            break
    # only draft-2 doesn't contain the version declaration
    return 'draft-2'