def find_deps(obj: CWLObjectType, document_loader: Loader, uri: str, basedir: Optional[str]=None, nestdirs: bool=True) -> CWLObjectType:
    'Find the dependencies of the CWL document.'
    deps = {'class': 'File', 'location': uri, 'format': CWL_IANA}

    def loadref(base: str, uri: str) -> Union[(CommentedMap, CommentedSeq, str, None)]:
        return document_loader.fetch(document_loader.fetcher.urljoin(base, uri))
    sfs = scandeps((basedir if basedir else uri), obj, {'$import', 'run'}, {'$include', '$schemas', 'location'}, loadref, nestdirs=nestdirs)
    if (sfs is not None):
        deps['secondaryFiles'] = cast(MutableSequence[CWLOutputAtomType], mergedirs(sfs))
    return deps
Find the dependencies of the CWL document.
def find_deps(obj: CWLObjectType, document_loader: Loader, uri: str, basedir: Optional[str]=None, nestdirs: bool=True) -> CWLObjectType:
    
    deps = {'class': 'File', 'location': uri, 'format': CWL_IANA}

    def loadref(base: str, uri: str) -> Union[(CommentedMap, CommentedSeq, str, None)]:
        return document_loader.fetch(document_loader.fetcher.urljoin(base, uri))
    sfs = scandeps((basedir if basedir else uri), obj, {'$import', 'run'}, {'$include', '$schemas', 'location'}, loadref, nestdirs=nestdirs)
    if (sfs is not None):
        deps['secondaryFiles'] = cast(MutableSequence[CWLOutputAtomType], mergedirs(sfs))
    return deps