def printdeps(obj: CWLObjectType, document_loader: Loader, stdout: Union[(TextIO, StreamWriter)], relative_deps: str, uri: str, basedir: Optional[str]=None, nestdirs: bool=True) -> None:
    'Print a JSON representation of the dependencies of the CWL document.'
    deps = find_deps(obj, document_loader, uri, basedir=basedir, nestdirs=nestdirs)
    if (relative_deps == 'primary'):
        base = (basedir if basedir else os.path.dirname(uri_file_path(str(uri))))
    elif (relative_deps == 'cwd'):
        base = os.getcwd()
    visit_class(deps, ('File', 'Directory'), functools.partial(make_relative, base))
    print(json_dumps(deps, indent=4, default=str), file=stdout)
Print a JSON representation of the dependencies of the CWL document.
def printdeps(obj: CWLObjectType, document_loader: Loader, stdout: Union[(TextIO, StreamWriter)], relative_deps: str, uri: str, basedir: Optional[str]=None, nestdirs: bool=True) -> None:
    
    deps = find_deps(obj, document_loader, uri, basedir=basedir, nestdirs=nestdirs)
    if (relative_deps == 'primary'):
        base = (basedir if basedir else os.path.dirname(uri_file_path(str(uri))))
    elif (relative_deps == 'cwd'):
        base = os.getcwd()
    visit_class(deps, ('File', 'Directory'), functools.partial(make_relative, base))
    print(json_dumps(deps, indent=4, default=str), file=stdout)