code: def test_single_value_float():
      for a in (2.25, 1.0, -3.5, 0.0):
          if not a:
              expected_min = 0.0
              expected_max = 1.0
          elif a > 0:
              expected_min = -a
              expected_max = 3 * a
          else:
              expected_min = 3 * a
              expected_max = -a
          c = interactive(f, a=a)
          w = c.children[0]
          check_widget(
              w,
              cls=widgets.FloatSlider,
              description="a",
              value=a,
              min=expected_min,
              max=expected_max,
              step=0.1,
              readout=True,
          )
  
imports: from unittest.mock import patch
  import os
  from collections import OrderedDict
  import pytest
  import ipywidgets
  from traitlets import TraitError, Float
  from ipywidgets import interact, interact_manual, interactive, interaction, Output, Widget
  from .utils import setup, teardown
label_desc: Use image node_id 8 for calling a global function with example usage: test_single_value_float() without return types