class_docstr: 可以控制一个函数实际的运行频率的函数修饰器。
  
  :param every: 表示一个函数隔多少次运行一次；
  :param once: 只在第多少次触发才真正运行一次。即第 ``once`` 次调用时才运行相应的函数，无论之前还是之后均不会运行；
  :param filter_fn: 用户定制的频率控制函数；注意该函数内部的频率判断应当是无状态的，除了参数 `self.num_called` 和
      `self.num_executed` 外，因为我们会在预跑后重置这两个参数的状态；
code: def __init__(
      self,
      every: Optional[int] = None,
      once: Optional[int] = None,
      filter_fn: Optional[Callable] = None,
  ):
      # check legality
      check_legality(lambda *args, **kwargs: ...)(
          every, once, filter_fn
      )
      if (every is None) and (once is None) and (filter_fn is None):
          every = 1
      # 设置变量，包括全局变量；
      self.num_called = 0
      self.num_executed = 0
  
      if every is not None:
          self._every = every
          self._filter = self.every_filter
      elif once is not None:
          self._once = once
          self._filter = self.once_filter
      else:
          self._filter = filter_fn
  
imports: from typing import Optional, Callable, Dict
  from functools import wraps
label_desc: Use image node_id 1 to create a new Filter object  with example: obj = Filter(every, once, filter_fn)