code: def wrap(self, methodName, types, skip=2):
          
  
          def handler(fields):
              try:
                  args = [
                      field if typ is str else
                      int(field or 0) if typ is int else
                      float(field or 0) if typ is float else
                      bool(int(field or 0))
                      for (typ, field) in zip(types, fields[skip:])]
                  method(*args)
              except Exception:
                  self.logger.exception(f'Error for {methodName}:')
  
          method = getattr(self.wrapper, methodName, None)
          return handler if method else lambda *args: None
docs: Create a message handler that invokes a wrapper method
          with the in-order message fields as parameters, skipping over
          the first ``skip`` fields, and parsed according to the ``types`` list.