<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_deps(obj, # type: Mapping[Text, Any] document_loader, # type: Loader uri, # type: Text basedir=None, # type: Text nestdirs=True # type: bool """Find the dependencies of the CWL document."""

    deps = {"class": "File", "location": uri, "format": CWL_IANA}  # type: Dict[Text, Any]

    def loadref(base, uri):
        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"] = sfs

    return deps