<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def UnlockScanNode(self, path_spec):
 """Marks a scan node as unlocked. Args: path_spec (PathSpec):
 path specification. Raises: KeyError: if the scan node does not exists or is not locked. """

    if not self.HasScanNode(path_spec):
      raise KeyError('Scan node does not exist.')

    if path_spec not in self._locked_scan_nodes:
      raise KeyError('Scan node is not locked.')

    del self._locked_scan_nodes[path_spec]

    # Scan a node again after it has been unlocked.
    self._scan_nodes[path_spec].scanned = False