docstr: Delete URI and return the number of bytes deleted.
docstr_tok: ["Delete","URI","and","return","the","number","of","bytes","deleted","."]
code: def delete_uri(
      self, uri: str, logger: Optional[logging.Logger] = default_logger
  ) -> int:
      """Delete URI and return the number of bytes deleted."""
      logger.info("Got request to delete working dir URI %s", uri)
      local_dir = get_local_dir_from_uri(uri, self._resources_dir)
      local_dir_size = get_directory_size_bytes(local_dir)
  
      deleted = delete_package(uri, self._resources_dir)
      if not deleted:
          logger.warning(f"Tried to delete nonexistent URI: {uri}.")
          return 0
  
      return local_dir_size
  
file_path: ray/python/ray/_private/runtime_env/working_dir.py
imports: import logging
  import os
  from pathlib import Path
  from typing import Any, Dict, List, Optional
  from ray._private.runtime_env.context import RuntimeEnvContext
  from ray._private.runtime_env.packaging import Protocol, delete_package, download_and_unpack_package, get_local_dir_from_uri, get_uri_for_directory, get_uri_for_package, parse_uri, upload_package_if_needed, upload_package_to_gcs
  from ray._private.runtime_env.plugin import RuntimeEnvPlugin
  from ray._private.utils import get_directory_size_bytes, try_to_create_directory
  from ray.exceptions import RuntimeEnvSetupError
label_desc: Use image node_id 2 for calling the WorkingDirPlugin obj's underlying member method code with example usage: obj.delete_uri(uri, logger) and returns: local_dir_size, int