code: def test_control_guidance_switch(self):
      components = self.get_dummy_components()
      pipe = self.pipeline_class(**components)
      pipe.to(torch_device)
  
      scale = 10.0
      steps = 4
  
      inputs = self.get_dummy_inputs(torch_device)
      inputs["num_inference_steps"] = steps
      inputs["controlnet_conditioning_scale"] = scale
      output_1 = pipe(**inputs)[0]
  
      inputs = self.get_dummy_inputs(torch_device)
      inputs["num_inference_steps"] = steps
      inputs["controlnet_conditioning_scale"] = scale
      output_2 = pipe(
          **inputs, control_guidance_start=0.1, control_guidance_end=0.2
      )[0]
  
      inputs = self.get_dummy_inputs(torch_device)
      inputs["num_inference_steps"] = steps
      inputs["controlnet_conditioning_scale"] = scale
      output_3 = pipe(
          **inputs,
          control_guidance_start=[0.1, 0.3],
          control_guidance_end=[0.2, 0.7],
      )[0]
  
      inputs = self.get_dummy_inputs(torch_device)
      inputs["num_inference_steps"] = steps
      inputs["controlnet_conditioning_scale"] = scale
      output_4 = pipe(
          **inputs,
          control_guidance_start=0.4,
          control_guidance_end=[0.5, 0.8],
      )[0]
  
      # make sure that all outputs are different
      assert np.sum(np.abs(output_1 - output_2)) > 1e-3
      assert np.sum(np.abs(output_1 - output_3)) > 1e-3
      assert np.sum(np.abs(output_1 - output_4)) > 1e-3
  
imports: import gc
  import unittest
  import numpy
  import torch
  from transformers import CLIPTextConfig, CLIPTextModel, CLIPTextModelWithProjection, CLIPTokenizer
  from diffusers import AutoencoderKL, ControlNetModel, EulerDiscreteScheduler, LCMScheduler, StableDiffusionXLControlNetPipeline, UNet2DConditionModel
  from diffusers.models.unet_2d_blocks import UNetMidBlock2D
  from diffusers.pipelines.controlnet.pipeline_controlnet import MultiControlNetModel
  from diffusers.utils.import_utils import is_xformers_available
  from diffusers.utils.testing_utils import enable_full_determinism, load_image, require_torch_gpu, slow, torch_device
  from diffusers.utils.torch_utils import randn_tensor
  from ..pipeline_params import IMAGE_TO_IMAGE_IMAGE_PARAMS, TEXT_TO_IMAGE_BATCH_PARAMS, TEXT_TO_IMAGE_IMAGE_PARAMS, TEXT_TO_IMAGE_PARAMS
  from ..test_pipelines_common import PipelineKarrasSchedulerTesterMixin, PipelineLatentTesterMixin, PipelineTesterMixin, SDXLOptionalComponentsTesterMixin
label_desc: Use image node_id 3 for calling the StableDiffusionXLMultiControlNetPipelineFastTests obj's underlying member method code with example usage: obj.test_control_guidance_switch() without return types