def _filter_none(items):
    """Filter special placeholder value, preserves sequence type."""
    type_ = list if isinstance(items, list) else tuple
    return type_(filter(_not_none, items))
Filter special placeholder value, preserves sequence type.