code: def GetRootKey(self):
      
      root_registry_key = virtual.VirtualWinRegistryKey('')
  
      for mapped_key in self._MAPPED_KEYS:
        key_path_segments = key_paths.SplitKeyPath(mapped_key)
        if not key_path_segments:
          continue
  
        registry_key = root_registry_key
        for name in key_path_segments[:-1]:
          sub_registry_key = registry_key.GetSubkeyByName(name)
          if not sub_registry_key:
            sub_registry_key = virtual.VirtualWinRegistryKey(name)
            registry_key.AddSubkey(sub_registry_key)
  
          registry_key = sub_registry_key
  
        sub_registry_key = registry_key.GetSubkeyByName(key_path_segments[-1])
        if (not sub_registry_key and
            isinstance(registry_key, virtual.VirtualWinRegistryKey)):
          sub_registry_key = virtual.VirtualWinRegistryKey(
              key_path_segments[-1], registry=self)
  
          registry_key.AddSubkey(sub_registry_key)
  
      return root_registry_key
docs: Retrieves the Windows Registry root key.
  
      Returns:
        WinRegistryKey: Windows Registry root key.
  
      Raises:
        RuntimeError: if there are multiple matching mappings and
            the correct mapping cannot be resolved.