def tokenCost(token):

        tp = type(token)
        if issubclass(tp, basestring):
            if token[:8] in ("hintmask", "cntrmask"):
                return 1 + len(token[9:])
            elif token in SINGLE_BYTE_OPS:
                return 1
            else:
                return 2
        elif tp == tuple:
            assert token[0] in ("hintmask", "cntrmask")
            return 1 + len(token[1])
        elif tp == int:
            if -107 <= token <= 107:
                return 1
            elif 108 <= token <= 1131 or -1131 <= token <= -108:
                return 2
            else:
                return 3
        elif tp == float:
            return 5
        assert 0
returns file with specified blurring kernel
dataset/ETHPy150Open googlei18n/compreffor/compreffor/pyCompressor.py/tokenCost--crossover with--dataset/ETHPy150Open Mouse-Imaging-Centre/pydpiper/atoms_and_modules/registration_file_handling.py/RegistrationGroupedFiles.getBlur