code: def apply_spot_settings(nodegroup, config):
      spot_settings = {
          "name": "cx-ws-" + config["name"],
          "instanceType": "mixed",
          "instancesDistribution": {
              "instanceTypes": config["spot_config"][
                  "instance_distribution"
              ],
              "onDemandBaseCapacity": config["spot_config"][
                  "on_demand_base_capacity"
              ],
              "onDemandPercentageAboveBaseCapacity": config[
                  "spot_config"
              ]["on_demand_percentage_above_base_capacity"],
              "maxPrice": config["spot_config"]["max_price"],
              "spotInstancePools": config["spot_config"][
                  "instance_pools"
              ],
          },
          "labels": {"lifecycle": "Ec2Spot"},
      }
  
      return merge_override(nodegroup, spot_settings)
  
imports: import json
  import click
  from collections import namedtuple
  import re
  import yaml
label_desc: Use image node_id 6 for calling a global function with example usage: apply_spot_settings(nodegroup, config) and returns: merge_override