code: def _freeze(self, action=None):
          
          if action is None:
              action = current_action()
          if action is None:
              task_uuid = unicode(uuid4())
              task_level = [1]
          else:
              task_uuid = action._identification[TASK_UUID_FIELD]
              task_level = action._nextTaskLevel().as_list()
          timestamp = self._timestamp()
          new_values = {
              TIMESTAMP_FIELD: timestamp,
              TASK_UUID_FIELD: task_uuid,
              TASK_LEVEL_FIELD: task_level
          }
          if "action_type" not in self._contents and (
              "message_type" not in self._contents
          ):
              new_values["message_type"] = ""
          new_values.update(self._contents)
          return new_values
docs: Freeze this message for logging, registering it with C{action}.
  
          @param action: The L{Action} which is the context for this message. If
              C{None}, the L{Action} will be deduced from the current call
              stack.
  
          @return: A L{PMap} with added C{timestamp}, C{task_uuid}, and
              C{task_level} entries.