code: def make_double_slider(attr, idx):
      """Create a double slider for a given lookup table attribute."""
  
      def set_min(min_value):
          max_value = getattr(lut, attr)[1]
          if min_value > max_value:
              # force the movement of the maximum value
              max_value = min_value
              pl.slider_widgets[
                  idx * 2 + 1
              ].GetRepresentation().SetValue(max_value)
          setattr(lut, attr, (min_value, max_value))
  
          if attr == "scalar_range":
              actor.mapper.scalar_range = getattr(lut, attr)
  
      def set_max(max_value):
          min_value = getattr(lut, attr)[0]
          if max_value < min_value:
              # force the movement of the minimum value
              min_value = max_value
              pl.slider_widgets[idx * 2].GetRepresentation().SetValue(
                  min_value
              )
          setattr(lut, attr, (min_value, max_value))
  
          if attr == "scalar_range":
              actor.mapper.scalar_range = getattr(lut, attr)
  
      if attr == "scalar_range":
          rng = scalars_rng
      else:
          rng = (0, 1)
  
      # create two overlapping slider bars by hiding the tube of the second
      pl.add_slider_widget(
          set_min,
          rng,
          value=getattr(lut, attr)[0],
          interaction_event="always",
          title=" ".join(attr.split("_")).capitalize(),
          tube_width=0.003,
          pointa=(0.6, 0.9 - 0.165 * idx),
          pointb=(0.9, 0.9 - 0.165 * idx),
      )
      pl.add_slider_widget(
          set_max,
          rng,
          value=getattr(lut, attr)[1],
          interaction_event="always",
          tube_width=0.0,
          pointa=(0.6, 0.9 - 0.165 * idx),
          pointb=(0.9, 0.9 - 0.165 * idx),
      )
  
imports: import pyvista
  from pyvista import examples
label_desc: Use image node_id 3 for calling a global function with example usage: make_double_slider(attr, idx) without return types