code: def encode_quorum(self, rw):
          
          if rw in QUORUM_TO_PB:
              return QUORUM_TO_PB[rw]
          elif type(rw) is int and rw >= 0:
              return rw
          else:
              return None
docs: Converts a symbolic quorum value into its on-the-wire
          equivalent.
  
          :param rw: the quorum
          :type rw: string, integer
          :rtype: integer