code: def filter_empty(values, default=None):
      
  
      if values is None:
          return default
      elif hasattr(values, '__len__') and len(values) == 0:
          return default
      elif hasattr(values, '__iter__') and not isinstance(values, _filtered_types):
          filtered = type(values) if isinstance(values, _filter_types) else list
          values = filtered(
              v for v in values if not (v is None or (hasattr(v, '__len__') and len(v) == 0))
          )
          return default if len(values) == 0 else values
  
      return values
docs: Eliminates None or empty items from lists, tuples or sets passed in.
      If values is None or empty after filtering, the default is returned.