code: def add_credentials_into_provider_section(config):
      provider_config = config["provider"]
  
      # vsphere_config is an optional field as the cred/entials can also be specified
      # as env variables so first check verifies if this field is present before
      # accessing its properties
      if (
          "vsphere_config" in provider_config
          and "credentials" in provider_config["vsphere_config"]
      ):
          return
  
      env_credentials = {
          "server": os.environ["VSPHERE_SERVER"],
          "user": os.environ["VSPHERE_USER"],
          "password": os.environ["VSPHERE_PASSWORD"],
      }
  
      provider_config["vsphere_config"]["credentials"] = env_credentials
  
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 5 for calling a global function with example usage: add_credentials_into_provider_section(config) without return types