class_docstr: Arithmetic coding
  
  https://github.com/gw-c/arith
  http://www.drdobbs.com/cpp/data-compression-with-arithmetic-encodin/240169251
  https://en.wikipedia.org/wiki/Arithmetic_coding
code: def _get_range(
      self,
      data: str,
      probs: dict[str, tuple[Fraction, Fraction]],
  ) -> tuple[Fraction, Fraction]:
      if self.terminator is not None:
          if self.terminator in data:
              data = data.replace(self.terminator, "")
          data += self.terminator
  
      start = Fraction(0, 1)
      width = Fraction(1, 1)
      for char in data:
          prob_start, prob_width = probs[char]
          start += prob_start * width
          width *= prob_width
      return start, start + width
  
imports: from __future__ import annotations
  import codecs
  import math
  from collections import Counter
  from fractions import Fraction
  from itertools import groupby, permutations
  from typing import Any, Sequence, TypeVar
  from .base import Base
label_desc: Use image node_id 3 for calling the ArithNCD obj's underlying member method code with example usage: obj._get_range(data, probs) and returns: start,  unknown