def request(self, msg, use_mid=None):
        """Send a request message, with automatic message ID assignment.

        Parameters
        ----------
        msg : katcp.Message request message
        use_mid : bool or None, default=None

        Returns
        -------
        mid : string or None
            The message id, or None if no msg id is used

        If use_mid is None and the server supports msg ids, or if use_mid is
        True a message ID will automatically be assigned msg.mid is None.

        if msg.mid has a value, and the server supports msg ids, that value
        will be used. If the server does not support msg ids, KatcpVersionError
        will be raised.

        """
        mid = self._get_mid_and_update_msg(msg, use_mid)
        self.send_request(msg)
        return mid