code: def to_xml(self):
      testcase = Junit.testcase(
          time="%.3f" % self.duration, **self.attrs
      )
      testcase.append(self.make_properties_node())
      for node in self.nodes:
          testcase.append(node)
      return testcase
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import os
  import platform
  import re
  import sys
  import time
  from datetime import datetime
  import py
  import six
  import pytest
  from _pytest import nodes
  from _pytest.config import filename_arg
label_desc: Use image node_id 7 for calling the _NodeReporter obj's underlying member method code with example usage: obj.to_xml() and returns: testcase