code: def visitor(arg_type):
      
  
      def decorator(fn):
          declaring_class = _declaring_class(fn)
          _methods[(declaring_class, arg_type)] = fn
  
          # Replace all decorated methods with _visitor_impl
          return _visitor_impl
  
      return decorator
docs: Decorator that creates a visitor method.