code: def send_msg(self, msg):
          
          if not self.is_active:
              self.logger.debug(
                  'Cannot send message: Already deactivated: msg=%s', msg)
              return
          elif not self.send_q:
              self.logger.debug(
                  'Cannot send message: Send queue does not exist: msg=%s', msg)
              return
          elif self.zserv_ver != msg.version:
              self.logger.debug(
                  'Zebra protocol version mismatch:'
                  'server_version=%d, msg.version=%d',
                  self.zserv_ver, msg.version)
              msg.version = self.zserv_ver  # fixup
  
          self.send_q.put(msg.serialize())
docs: Sends Zebra message.
  
          :param msg: Instance of py:class: `ryu.lib.packet.zebra.ZebraMessage`.
          :return: Serialized msg if succeeded, otherwise None.