code: def filter(self, filter_fn):
          
          op = Operator(
              _generate_uuid(),
              OpType.Filter,
              "Filter",
              filter_fn,
              num_instances=self.env.config.parallelism)
          return self.__register(op)
docs: Applies a filter to the stream.
  
          Attributes:
               filter_fn (function): The user-defined filter function.