code: def _file_local_or_remote(f, get_retriever):
      
      if os.path.exists(f):
          return f
      integration, config = get_retriever.integration_and_config(f)
      if integration:
          return integration.file_exists(f, config)
docs: Check for presence of a local or remote file.