code: def register_function(self, name: Optional[str]=None):
          
          def wrap(function: Callable)->Any:
              nonlocal name
              if name is None:
                  name = function.__name__
              self.funcs[name] = function
              return function
          return wrap
docs: 注册函数.
  
          Parameters:
              name (Optional[str]): - 将函数注册到的名字,如果为None,name就用其原来的名字