class Substitute(object):
    def getValue(self, key, code):
        key_map = {c: str((i + 1) % 10) for i, c in enumerate(key)}
        return int("".join(key_map[c] for c in code if c in key_map))

0519dd3d0a67166e6f95be1cad21edf41f3d9a33
<mask token>

class Substitute(object):
    <mask token>

class Substitute(object):

    def getValue(self, key, code):
        key_map = {c: str((i + 1) % 10) for i, c in enumerate(key)}
        return int(''.join(key_map[c] for c in code if c in key_map))

class Substitute(object):
    def getValue(self, key, code):
        key_map = {c: str((i + 1) % 10) for i, c in enumerate(key)}
        return int("".join(key_map[c] for c in code if c in key_map))
