code: def last_written_time(self):
      
      if not self._registry_key and self._registry:
        self._GetKeyFromRegistry()
  
      if not self._registry_key:
        return None
  
      return self._registry_key.last_written_time
docs: dfdatetime.DateTimeValues: last written time or None.