code: def get_data(self, suffix):
      _suffix = urlparse(self.path).path
      _, flow, run_id, step, task_id, card_hash = _suffix.strip(
          "/"
      ).split("/")
      pathspec = "/".join([flow, run_id, step, task_id])
      cards = list(
          cards_for_task(
              self.card_options.flow_datastore,
              pathspec,
              card_hash=card_hash,
          )
      )
      if len(cards) == 0:
          self._response(
              {
                  "status": "Card Not Found",
              },
              is_json=True,
              code=404,
          )
          return
  
      status = "ok"
      try:
          task_object = self.card_options.run_object[step][task_id]
      except KeyError:
          return self._response(
              {"status": "Task Not Found", "is_complete": False},
              is_json=True,
              code=404,
          )
  
      is_complete = task_object.finished
      selected_card = cards[0]
      card_data = selected_card.get_data()
      if card_data is not None:
          self.log_message(
              "Task Success: %s, Task Finished: %s"
              % (task_object.successful, is_complete)
          )
          if not task_object.successful and is_complete:
              status = "Task Failed"
          self._response(
              {
                  "status": status,
                  "payload": card_data,
                  "is_complete": is_complete,
              },
              is_json=True,
          )
      else:
          self._response(
              {"status": "ok", "is_complete": is_complete},
              is_json=True,
              code=404,
          )
  
imports: import os
  import json
  from http.server import BaseHTTPRequestHandler
  from threading import Thread
  from multiprocessing import Pipe
  from multiprocessing.connection import Connection
  from urllib.parse import urlparse
  import time
  from .card_client import CardContainer
  from .exception import CardNotPresentException
  from .card_resolver import resolve_paths_from_task
  from metaflow.metaflow_config import DATASTORE_LOCAL_DIR
  from metaflow import namespace
  from metaflow.exception import CommandException, MetaflowNotFound, MetaflowNamespaceMismatch
label_desc: Use image node_id 4 for calling the CardViewerRoutes obj's underlying member method code with example usage: obj.get_data(suffix) and returns: self