code: def _find_available(
      current_version: str,
  ) -> Optional[Tuple[str, bool, bool, bool, Optional[str]]]:
      from pkg_resources import parse_version
  
      pypi_url = f"https://pypi.org/pypi/{wandb._wandb_module}/json"
  
      yanked_dict = {}
      try:
          # raise Exception("test")
          async_requests_get = wandb.util.async_call(
              requests.get, timeout=5
          )
          data, thread = async_requests_get(pypi_url, timeout=3)
          if not data or isinstance(data, Exception):
              return None
          data = data.json()
          latest_version = data["info"]["version"]
          release_list = data["releases"].keys()
          for version, fields in data["releases"].items():
              for item in fields:
                  yanked = item.get("yanked")
                  yanked_reason = item.get("yanked_reason")
                  if yanked:
                      yanked_dict[version] = yanked_reason
      except Exception:
          # Any issues whatsoever, just skip the latest version check.
          return None
  
      # Return if no update is available
      pip_prerelease = False
      deleted = False
      yanked = False
      yanked_reason = None
      parsed_current_version = parse_version(current_version)
  
      # Check if current version has been yanked or deleted
      # NOTE: we will not return yanked or deleted if there is nothing to upgrade to
      if current_version in release_list:
          yanked = current_version in yanked_dict
          yanked_reason = yanked_dict.get(current_version)
      else:
          deleted = True
  
      # Check pre-releases
      if parse_version(latest_version) <= parsed_current_version:
          # pre-releases are not included in latest_version
          # so if we are currently running a pre-release we check more
          if not parsed_current_version.is_prerelease:
              return None
          # Candidates are pre-releases with the same base_version
          release_list = map(parse_version, release_list)
          release_list = filter(lambda v: v.is_prerelease, release_list)
          release_list = filter(
              lambda v: v.base_version
              == parsed_current_version.base_version,
              release_list,
          )
          release_list = sorted(release_list)
          if not release_list:
              return None
  
          parsed_latest_version = release_list[-1]
          if parsed_latest_version <= parsed_current_version:
              return None
          latest_version = str(parsed_latest_version)
          pip_prerelease = True
  
      return (
          latest_version,
          pip_prerelease,
          deleted,
          yanked,
          yanked_reason,
      )
  
imports: from typing import Dict, Optional, Tuple
  import requests
  import wandb
label_desc: Use image node_id 1 for calling a global function with example usage: _find_available(current_version) and returns: latest_version,  pip_prerelease,  deleted,  yanked,  yanked_reason, None, None, None, None, None