def GetSubkeyByIndex(self, index):
if index < <NUM_LIT:0> or index >= self._pyregf_key.number_of_sub_keys:<EOL><INDENT>raise IndexError('<STR_LIT>')<EOL><DEDENT>pyregf_key = self._pyregf_key.get_sub_key(index)<EOL>if not pyregf_key:<EOL><INDENT>return None<EOL><DEDENT>key_path = key_paths.JoinKeyPath([self._key_path, pyregf_key.name])<EOL>return REGFWinRegistryKey(pyregf_key, key_path=key_path)<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.