def Matches(self, registry_key, search_depth):
if self._key_path_segments is None:<EOL><INDENT>key_path_match = None<EOL><DEDENT>else:<EOL><INDENT>key_path_match = self._CheckKeyPath(registry_key, search_depth)<EOL>if not key_path_match:<EOL><INDENT>return False, key_path_match<EOL><DEDENT>if search_depth != self._number_of_key_path_segments:<EOL><INDENT>return False, key_path_match<EOL><DEDENT><DEDENT>return True, key_path_match<EOL>
Determines if the Windows Registry key matches the find specification.

        Args:
          registry_key (WinRegistryKey): Windows Registry key.
          search_depth (int): number of key path segments to compare.

        Returns:
          tuple: contains:

            bool: True if the Windows Registry key matches the find specification,
                False otherwise.
            bool: True if the key path matches, False if not or None if no key path
                specified.