def _BuildKeyHierarchy(self, subkeys, values):
if subkeys:<EOL><INDENT>for registry_key in subkeys:<EOL><INDENT>name = registry_key.name.upper()<EOL>if name in self._subkeys:<EOL><INDENT>continue<EOL><DEDENT>self._subkeys[name] = registry_key<EOL>registry_key._key_path = key_paths.JoinKeyPath([<EOL>self._key_path, registry_key.name])<EOL><DEDENT><DEDENT>if values:<EOL><INDENT>for registry_value in values:<EOL><INDENT>name = registry_value.name.upper()<EOL>if name in self._values:<EOL><INDENT>continue<EOL><DEDENT>self._values[name] = registry_value<EOL><DEDENT><DEDENT>
Builds the Windows Registry key hierarchy.

        Args:
          subkeys (list[FakeWinRegistryKey]): list of subkeys.
          values (list[FakeWinRegistryValue]): list of values.