code: def bootstrap_vsphere(config):
      # create a copy of the input config to modify
      config = copy.deepcopy(config)
  
      add_credentials_into_provider_section(config)
      # Update library item configs
      update_vsphere_configs(config)
  
      # Log warnings if user included deprecated `head_node` or `worker_nodes`
      # fields. Raise error if no `available_node_types`
      check_legacy_fields(config)
  
      # Configure SSH access, using an existing key pair if possible.
      config = configure_key_pair(config)
  
      global_event_system.execute_callback(
          CreateClusterEvent.ssh_keypair_downloaded,
          {"ssh_key_path": config["auth"]["ssh_private_key"]},
      )
  
      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 1 for calling a global function with example usage: bootstrap_vsphere(config) and returns: config