code: def build_filter(predicate: Callable[[Any], bool] = None, *,
                   unpack: bool = False):
      
      def _build_filter(predicate: Callable[[Any], bool]):
          @wraps(predicate)
          def _wrapper(*args, **kwargs) -> Filter:
              if 'unpack' in kwargs:
                  raise TypeError('"unpack" has to be defined by decorator')
              return Filter(predicate, *args, unpack=unpack, **kwargs)
          return _wrapper
  
      if predicate:
          return _build_filter(predicate)
  
      return _build_filter
docs: Decorator to wrap a function to return a Filter operator.
  
      :param predicate: function to be wrapped
      :param unpack: value from emits will be unpacked (*value)