code: def configure_key_pair(config):
      logger.info(
          "Configuring keys for Ray Cluster Launcher to ssh into the head node."
      )
  
      assert os.path.exists(
          PRIVATE_KEY_PATH
      ), "Private key file at path {} was not found".format(
          PRIVATE_KEY_PATH
      )
  
      assert os.path.exists(
          PUBLIC_KEY_PATH
      ), "Public key file at path {} was not found".format(
          PUBLIC_KEY_PATH
      )
  
      # updater.py file uses the following config to ssh onto the head node
      # Also, copies the file onto the head node
      config["auth"]["ssh_private_key"] = PRIVATE_KEY_PATH
  
      # The path where the public key should be copied onto the remote host
      public_key_remote_path = "~/{}".format(PUBLIC_KEY_NAME_EXTN)
  
      # Copy the public key to the remote host
      config["file_mounts"][public_key_remote_path] = PUBLIC_KEY_PATH
  
      return config
  
file_path: ray/python/ray/autoscaler/_private/vsphere/config.py
imports: import copy
  import logging
  import os
  from ray.autoscaler._private.event_system import CreateClusterEvent, global_event_system
  from ray.autoscaler._private.util import check_legacy_fields
label_desc: Use image node_id 7 for calling a global function with example usage: configure_key_pair(config) and returns: config