def reset_internal_states(self, record=None):
        """Resets the internal state of the recorder.

        Args:
            record: records.TestResultRecord, the test record for a test.
        """
        self._record = None
        self._count = 0
        self._record = record