code: def ac_encode(text, probs):
      
      coder = Arithmetic()
      coder.set_probs(probs)
      return coder.encode(text)
docs: Encode a text using arithmetic coding with the provided probabilities.
  
      This is a wrapper for :py:meth:`Arithmetic.encode`.
  
      Parameters
      ----------
      text : str
          A string to encode
      probs : dict
          A probability statistics dictionary generated by
          :py:meth:`Arithmetic.train`
  
      Returns
      -------
      tuple
          The arithmetically coded text
  
      Example
      -------
      >>> pr = ac_train('the quick brown fox jumped over the lazy dog')
      >>> ac_encode('align', pr)
      (16720586181, 34)