code: def add_pass_thru(pass_thrus):
      
      def meth(self, node):
          pass
  
      def dec(cls):
          for element_name in pass_thrus:
              for meth_prefix in ('visit_', 'depart_'):
                  meth_name = meth_prefix + element_name
                  if hasattr(cls, meth_name):
                      raise ValueError('method name {} already defined'
                                       .format(meth_name))
                  setattr(cls, meth_name, meth)
          return cls
  
      return dec
docs: Decorator adds explicit pass-through visit and depart methods