<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def encode_quorum(self, rw):
 """ Converts a symbolic quorum value into its on-the-wire equivalent. :param rw: the quorum :type rw: string, integer :rtype: integer """

        if rw in QUORUM_TO_PB:
            return QUORUM_TO_PB[rw]
        elif type(rw) is int and rw >= 0:
            return rw
        else:
            return None