<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def keycode_to_keysym(self, keycode, index):
 """Convert a keycode to a keysym, looking in entry index. Normally index 0 is unshifted, 1 is shifted, 2 is alt grid, and 3 is shift+alt grid. If that key entry is not bound, X.NoSymbol is returned."""

        try:
            return self._keymap_codes[keycode][index]
        except IndexError:
            return X.NoSymbol