def GetSubkeyByIndex(self, index):
if not self._registry_key and self._registry:<EOL><INDENT>self._GetKeyFromRegistry()<EOL><DEDENT>subkeys = list(self._subkeys.values())<EOL>if index < <NUM_LIT:0> or index >= len(subkeys):<EOL><INDENT>raise IndexError('<STR_LIT>')<EOL><DEDENT>return subkeys[index]<EOL>
Retrieves a subkey by index.

        Args:
          index (int): index of the subkey.

        Returns:
          WinRegistryKey: Windows Registry subkey or None if not found.

        Raises:
          IndexError: if the index is out of bounds.