docstr: Check if the payload exists remotely on the attached orgin Work.
  
  Raises:
      RuntimeError: If the payload is not attached to any Work (origin undefined).
docstr_tok: ["Check","if","the","payload","exists","remotely","on","the","attached","orgin","Work",".","Raises",":","RuntimeError",":","If","the","payload","is","not","attached","to","any","Work","(","origin","undefined",")","."]
code: def exists_remote(self):
      """Check if the payload exists remotely on the attached orgin Work.
  
      Raises:
          RuntimeError: If the payload is not attached to any Work (origin undefined).
  
      """
      # Fail early if we need to check the remote but an origin is not defined
      if (
          not self._origin
          or self._request_queue is None
          or self._response_queue is None
      ):
          raise RuntimeError(
              f"Trying to check if the payload {self} exists, but the payload is not attached to a LightningWork."
              f" Set it as an attribute to a LightningWork or pass it to the `run()` method."
          )
  
      # 1. Send message to orchestrator through queue that with a request for a path existence check
      request = _ExistsRequest(
          source=self.origin_name,
          name=self._name,
          path=str(self._path),
          hash=self.hash,
      )
      self._request_queue.put(request)
  
      # 2. Wait for the response to come back
      response: _ExistsResponse = self._response_queue.get()  # blocking
      return response.exists
  
imports: import hashlib
  import pathlib
  import pickle
  from abc import ABC, abstractmethod
  from time import sleep
  from typing import TYPE_CHECKING, Any, Optional, Union
  from lightning.app.core.constants import REMOTE_STORAGE_WAIT
  from lightning.app.core.queues import BaseQueue
  from lightning.app.storage.path import Path, _filesystem, _shared_storage_path
  from lightning.app.storage.requests import _ExistsRequest, _ExistsResponse, _GetRequest, _GetResponse
  from lightning.app.utilities.app_helpers import Logger
  from lightning.app.utilities.component import _is_flow_context
label_desc: Use image node_id 13 for calling the _BasePayload obj's underlying member method code with example usage: obj.exists_remote() and returns: response