code: def test_extract_filter_from_fn(self):
      @Filter(every=10)
      def _fn(data):
          return data
  
      _filter_num_called = []
      _filter_num_executed = []
      for i in range(100):
          cu_res = _fn(i)
          _filter = _fn.__fastNLP_filter__
          _filter_num_called.append(_filter.num_called)
          _filter_num_executed.append(_filter.num_executed)
      assert _filter_num_called == list(range(1, 101))
      assert _filter_num_executed == [0] * 9 + reduce(
          lambda x, y: x + y, [[w] * 10 for w in range(1, 10)]
      ) + [10]
  
      def _fn(data):
          return data
  
      assert not hasattr(_fn, "__fastNLP_filter__")
  
file_path: fastNLP/tests/core/callbacks/test_callback_event.py
imports: import pytest
  from functools import reduce
  from fastNLP.core.callbacks.callback_event import Event, Filter
label_desc: Use image node_id 3 for calling the TestFilter obj's underlying member method code with example usage: obj.test_extract_filter_from_fn() and returns: data, data