code: def get_version(host: str) -> Dict[str, Any]:
      client_info = {"version": determined.__version__}
  
      master_info = {"cluster_id": "", "master_id": "", "version": ""}
  
      try:
          master_info = api.get(
              host, "info", authenticated=False
          ).json()
          # Most connection errors mean that the master is unreachable, which this function handles.
          # An SSL error, however, means it was reachable but something went wrong, so let that error
          # propagate out.
      except requests.exceptions.SSLError:
          raise
      except api.errors.MasterNotFoundException:
          pass
  
      return {
          "client": client_info,
          "master": master_info,
          "master_address": host,
      }
  
file_path: determined/harness/determined/cli/version.py
imports: import argparse
  import sys
  from typing import Any, Dict, List
  import requests
  import termcolor
  from packaging import version
  import determined
  import determined.cli
  from determined.cli import render
  from determined.common import api
  from determined.common.declarative_argparse import Cmd
label_desc: Use image node_id 1 for calling a global function with example usage: get_version(host) and returns: dict