class_docstr: Creates a slider that ranges from {minimum} to {maximum} with a step size of {step}.
  Preprocessing: passes slider value as a {float} into the function.
  Postprocessing: expects an {int} or {float} returned from function and sets slider value to it as long as it is within range.
  Examples-format: A {float} or {int} representing the slider's value.
  
  Demos: sentence_builder, slider_release, interface_random_slider, blocks_random_slider
  Guides: create-your-own-friends-with-a-gan
code: def get_random_value(self):
      n_steps = int((self.maximum - self.minimum) / self.step)
      step = random.randint(0, n_steps)
      value = self.minimum + step * self.step
      # Round to number of decimals in step so that UI doesn't display long decimals
      n_decimals = max(str(self.step)[::-1].find("."), 0)
      if n_decimals:
          value = round(value, n_decimals)
      return value
  
file_path: gradio/gradio/components/slider.py
imports: from __future__ import annotations
  import math
  import random
  from typing import Any, Callable
  from gradio_client.documentation import document, set_documentation_group
  from gradio.components.base import FormComponent
  from gradio.events import Events
label_desc: Use image node_id 4 for calling the Slider obj's underlying member method code with example usage: obj.get_random_value() and returns: value