class_docstr: Serializes any CheckFailure instance into JUnit format.
  
  Parameters
  ----------
  value : CheckFailure
      CheckFailure instance that needed to be serialized.
docstr: Serialize a CheckFailure instance into JUnit format.
  
  In general the format is the following. The tag is allowed to be switched out to skipped. Junit output takes the
  following format:
  
  <failure message="Assertion FAILED: failed assert" type="failure">
      the output of the testcase
  </failure>
  
  Parameters
  ----------
  failure_tag : str
      Set the tests that fail as either skipped or failure, this allows CI/CD systems to ignore failed tests if
      development does not want them to stop the build.
  
  Returns
  -------
  ET.Element
docstr_tok: ["Serialize","a","CheckFailure","instance","into","JUnit","format",".","In","general","the","format","is","the","following",".","The","tag","is","allowed","to","be","switched","out","to","skipped",".","Junit","output","takes","the","following","format",":","<","failure","message=","''","Assertion","FAILED",":","failed","assert","''","type=","''","failure","''",">","the","output","of","the","testcase","<","\/failure",">","Parameters","--","--","--","--","--","failure_tag",":","str","Set","the","tests","that","fail","as","either","skipped","or","failure",",","this","allows","CI\/CD","systems","to","ignore","failed","tests","if","development","does","not","want","them","to","stop","the","build",".","Returns","--","--","--","-","ET.Element"]
code: def serialize(
      self, failure_tag: str = FAILURE, **kwargs
  ) -> ET.Element:
      """Serialize a CheckFailure instance into JUnit format.
  
      In general the format is the following. The tag is allowed to be switched out to skipped. Junit output takes the
      following format:
  
      <failure message="Assertion FAILED: failed assert" type="failure">
          the output of the testcase
      </failure>
  
      Parameters
      ----------
      failure_tag : str
          Set the tests that fail as either skipped or failure, this allows CI/CD systems to ignore failed tests if
          development does not want them to stop the build.
  
      Returns
      -------
      ET.Element
      """
      if failure_tag not in [FAILURE, SKIPPED]:
          raise ValueError(
              f"failure_tag must be one of {FAILURE} or {SKIPPED}"
          )
  
      attributes = {
          "classname": self.value.check.__class__.__module__
          + "."
          + self.value.check.__class__.__name__,
          "name": self.value.get_header(),
          "time": str(self.value.run_time),
      }
  
      root = ET.Element("testcase", attrib=attributes)
      attrs = {
          "type": failure_tag,
          "message": str(self.value.exception),
      }
      failure_element = ET.Element(failure_tag, attrs)
      failure_element.text = self.value.check.metadata().get(
          "summary", ""
      )
  
      root.append(failure_element)
  
      return root
  
imports: import xml.etree.ElementTree
  from deepchecks.core import check_result
  from deepchecks.core.serialization.abc import JunitSerializer
label_desc: Use image node_id 2 for calling the CheckFailureSerializer obj's underlying member method code with example usage: obj.serialize(failure_tag) and returns: root