code: def build_slider(
      initial_value,
      max_value,
      min_value=0,
      length=450,
      line_width=3,
      radius=8,
      font_size=16,
      text_template="{value:.1f} ({ratio:.0%})",
      on_moving_slider=lambda _slider: None,
      on_value_changed=lambda _slider: None,
      on_change=lambda _slider: None,
      label="",
      label_font_size=16,
      label_style_bold=False,
      is_double_slider=False,
  ):
      """Create a horizon theme based disk-knob slider.
  
      Parameters
      ----------
      initial_value : float, (float, float)
          Initial value(s) of the slider.
      max_value : float
          Maximum value of the slider.
      min_value : float, optional
          Minimum value of the slider.
      length : int, optional
          Length of the slider.
      line_width : int, optional
          Width of the line on which the disk will slide.
      radius : int, optional
          Radius of the disk handle.
      font_size : int, optional
          Size of the text to display alongside the slider (pt).
      text_template : str, callable, optional
          If str, text template can contain one or multiple of the
          replacement fields: `{value:}`, `{ratio:}`.
          If callable, this instance of `:class:LineSlider2D` will be
          passed as argument to the text template function.
      on_moving_slider : callable, optional
          When the slider is interacted by the user.
      on_value_changed : callable, optional
          When value of the slider changed programmatically.
      on_change : callable, optional
          When value of the slider changed.
      label : str, optional
          Label to ui element for slider
      label_font_size : int, optional
          Size of label text to display with slider
      label_style_bold : bool, optional
          Is label should have bold style.
  
      Return
      ------
      (label: HorizonUIElement, element(slider): HorizonUIElement)
      """
  
      if is_double_slider and "ratio" in text_template:
          warnings.warn(
              "Double slider only support values and not ratio"
          )
          return
  
      slider_label = build_label(
          label,
          font_size=label_font_size,
          bold=label_style_bold,
          is_horizon_label=True,
      )
  
      if not is_double_slider:
          slider = ui.LineSlider2D(
              initial_value=initial_value,
              max_value=max_value,
              min_value=min_value,
              length=length,
              line_width=line_width,
              outer_radius=radius,
              font_size=font_size,
              text_template=text_template,
          )
      else:
          slider = ui.LineDoubleSlider2D(
              initial_values=initial_value,
              max_value=max_value,
              min_value=min_value,
              length=length,
              line_width=line_width,
              outer_radius=radius,
              font_size=font_size,
              text_template=text_template,
          )
  
      slider.on_moving_slider = on_moving_slider
      slider.on_value_changed = on_value_changed
      slider.on_change = on_change
  
      slider.default_color = (1.0, 0.5, 0.0)
      slider.track.color = (0.8, 0.3, 0.0)
      slider.active_color = (0.9, 0.4, 0.0)
      if not is_double_slider:
          slider.handle.color = (1.0, 0.5, 0.0)
      else:
          slider.handles[0].color = (1.0, 0.5, 0.0)
          slider.handles[1].color = (1.0, 0.5, 0.0)
  
      return (
          slider_label,
          HorizonUIElement(True, initial_value, slider),
      )
  
imports: from typing import Any
  from dataclasses import dataclass
  import warnings
  from abc import ABC, abstractmethod
  import numpy
  from dipy.utils.optpkg import optional_package
label_desc: Use image node_id 2 for calling a global function with example usage: build_slider(initial_value, max_value, min_value, length, line_width, radius, font_size, text_template, on_moving_slider, on_value_changed, on_change, label, label_font_size, label_style_bold, is_double_slider) and returns: slider_label,  HorizonUIElement