code: def widget_from_single_value(o):
          
          if isinstance(o, string_types):
              return Text(value=unicode_type(o))
          elif isinstance(o, bool):
              return Checkbox(value=o)
          elif isinstance(o, Integral):
              min, max, value = _get_min_max_value(None, None, o)
              return IntSlider(value=o, min=min, max=max)
          elif isinstance(o, Real):
              min, max, value = _get_min_max_value(None, None, o)
              return FloatSlider(value=o, min=min, max=max)
          else:
              return None
docs: Make widgets from single values, which can be used as parameter defaults.