def __getitem__(self, key):
        item = self.resolve(key)
        if isinstance(item, Undefined):
            raise KeyError(key)
        return item
count substitituions given a matrix Q and frequencies pi.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/jinja2-2.6/jinja2/runtime.py/Context.__getitem__--crossover with--dataset/ETHPy150Open CGATOxford/cgat/CGAT/RateEstimation.py/countSubstitutions