docs: def delist(values):
      """Reduce lists of zero or one elements to individual values."""
      assert isinstance(values, list)
  
      if not values:
          return None
      elif len(values) == 1:
          return values[0]
  
      return values