code: def widget_from_abbrev(cls, abbrev, default=empty):
          
          if isinstance(abbrev, ValueWidget) or isinstance(abbrev, fixed):
              return abbrev
  
          if isinstance(abbrev, tuple):
              widget = cls.widget_from_tuple(abbrev)
              if default is not empty:
                  try:
                      widget.value = default
                  except Exception:
                      # ignore failure to set default
                      pass
              return widget
  
          # Try single value
          widget = cls.widget_from_single_value(abbrev)
          if widget is not None:
              return widget
  
          # Something iterable (list, dict, generator, ...). Note that str and
          # tuple should be handled before, that is why we check this case last.
          if isinstance(abbrev, Iterable):
              widget = cls.widget_from_iterable(abbrev)
              if default is not empty:
                  try:
                      widget.value = default
                  except Exception:
                      # ignore failure to set default
                      pass
              return widget
  
          # No idea...
          return None
docs: Build a ValueWidget instance given an abbreviation or Widget.