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