subranges: detach cache logic from computation logic
Having both the logic around cache checking and setting makes is a bit harder to
follow. In addition, this allow to gather the computation logic next to the
other related function.
# name space package to host third party extensions
from __future__ import absolute_import
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)