def get(self):
    val = self.get_bits()
    try:
        return self.extra[val]
    except IndexError:
        return '[invalid value]'
def get(self):
    val = self.get_bits()
    try:
        return self.extra[val]
    except IndexError:
        return '[invalid value]'