code: def clear(self):
          '''
          Set the report to its defaults.
          This will clear the report, keeping only the name and setting the
          failure status to the default.
          '''
          self._data_fields = {}
          self._sub_reports = {}
          self.set_status(Report.FAILED if self._default_failed else Report.PASSED)
          self.add('name', self._name)
          self.add('sub_reports', []f clear(self):
          '''
          Set the report to its defaults.
          This will clear the report, keeping only the name and setting the
          failure status to the default.
          '''
          self._data_fields = {}
          self._sub_reports = {}
          self.set_status(Report.FAILED if self._default_failed else Report.PASSED)
          self.add('name', self._name)
          self.add('sub_reports', [])
docs: Set the report to its defaults.
          This will clear the report, keeping only the name and setting the
          failure status to the default.