code: def validate_file(
      uri: str,
      router_async_fs: RouterAsyncFS,
      *,
      validate_scheme: Optional[bool] = False,
  ) -> None:
      """
      Validates a URI's scheme if a file scheme cache was provided, and its cloud location's default storage policy if
      the URI points to a cloud with an ``AsyncFS`` implementation that supports checking that policy.
  
      Raises
      ------
      :class:`ValueError`
          If one of the validation steps fails.
      """
      return hail_event_loop().run_until_complete(
          _async_validate_file(
              uri, router_async_fs, validate_scheme=validate_scheme
          )
      )
  
imports: from hailtop.hail_event_loop import hail_event_loop
  from hailtop.aiocloud.aiogoogle.client.storage_client import GoogleStorageAsyncFS
  from hailtop.aiotools.router_fs import RouterAsyncFS
  from textwrap import dedent
  from typing import Optional
  from urllib.parse import urlparse
label_desc: Use image node_id 1 for calling a global function with example usage: validate_file(uri, router_async_fs) and returns: hail_event_loop