code: def check_graphql_put(
      api: Api, host: str
  ) -> Tuple[bool, Optional[str]]:
      # check graphql endpoint using an upload
      print("Checking signed URL upload".ljust(72, "."), end="")
      failed_test_strings = []
      gql_fp = "gql_test_file.txt"
      f = open(gql_fp, "w")
      f.write("test2")
      f.close()
      with wandb.init(
          id=nice_id("graphql_put"),
          reinit=True,
          project=PROJECT_NAME,
          config={"test": "put to graphql"},
      ) as run:
          wandb.save(gql_fp)
      public_api = wandb.Api()
      prev_run = public_api.run(f"{run.entity}/{PROJECT_NAME}/{run.id}")
      if prev_run is None:
          failed_test_strings.append(
              "Unable to access previous run through public API. Contact W&B for support."
          )
          print_results(failed_test_strings, False)
          return False, None
      # TODO: (kdg) refactor this so it doesn't rely on an exception handler
      try:
          read_file = retry_fn(partial(prev_run.file, gql_fp))
          url = read_file.url
          read_file = retry_fn(
              partial(read_file.download, replace=True)
          )
      except Exception:
          failed_test_strings.append(
              "Unable to read file successfully saved through a put request. Check SQS configurations, bucket permissions and topic configs."
          )
          print_results(failed_test_strings, False)
          return False, None
      contents = read_file.read()
      try:
          assert contents == "test2"
      except AssertionError:
          failed_test_strings.append(
              "Read file contents do not match saved file contents. Contact W&B for support."
          )
  
      print_results(failed_test_strings, False)
      return len(failed_test_strings) == 0, url
  
imports: import getpass
  import os
  import time
  from functools import partial
  from pathlib import Path
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import click
  import requests
  from pkg_resources import parse_version
  from wandb_gql import gql
  import wandb
  from wandb.sdk.artifacts.artifact import Artifact
  from wandb.sdk.lib import runid
  from ...apis.internal import Api
label_desc: Use image node_id 13 for calling a global function with example usage: check_graphql_put(api, host) and returns: unknown,  url, False,  None, False,  None