[docs]deffetch_usage(project:str,registry:str,url:str,force_remote:bool=False)->Optional[str]:""" Fetch the disk usage of a project. Args: project: Name of a project. registry: Path to the Gobbler registry. url: URL of the REST API. force_remote: Whether to force a remote query via ``url``, even if the ``registry`` is present on the current filesystem. Returns: The current usage (in bytes) for this project. """ifos.path.exists(registry)andnotforce_remote:proposed=os.path.join(registry,project,"..usage")withopen(proposed,"r")ashandle:used=json.load(handle)returnused["total"]res=requests.get(url+"/fetch/"+project+"/..usage")ifres.status_code>=300:raiseut.format_error(res)body=res.json()returnbody["total"]