code: def to_mozlog_format(self):
          
          data = {
              "action": self.action,
              "line_number": self.line,
              "test": self.test,
              "subtest": self.subtest,
              "status": self.status,
              "expected": self.expected,
              "message": self.message,
              "signature": self.signature,
              "level": self.level,
              "stack": self.stack,
              "stackwalk_stdout": self.stackwalk_stdout,
              "stackwalk_stderr": self.stackwalk_stderr,
          }
  
          # Remove empty values
          data = {k: v for k, v in data.items() if v}
  
          return data
docs: Convert a FailureLine into a mozlog formatted dictionary.