code: def test_serialize_output_tag(self):
      # arrange
      scorecard = dataclasses.replace(
          self.empty_scorecard,
          output=models.Output(
              [
                  models.OutputField(
                      name="Final Score",
                      feature="predictedValue",
                      dataType=models.DataType.double,
                      optype=models.OpType.continuous,
                  ),
                  models.OutputField(
                      name="Reason Code 1",
                      feature="reasonCode",
                      dataType=models.DataType.string,
                      optype=models.OpType.categorical,
                  ),
              ]
          ),
      )
  
      # when
      serialized = xmltodict.parse(
          TestNyokaSerializer.nyokaSerializer.serialize(scorecard)
      )
      output_content = serialized["PMML"]["Scorecard"]["Output"][
          "OutputField"
      ]
  
      # assert
      self.assertEqual(len(output_content), 2)
      self.assertEqual(output_content[0]["@name"], "Final Score")
      self.assertEqual(output_content[0]["@feature"], "predictedValue")
      self.assertEqual(output_content[0]["@dataType"], "double")
      self.assertEqual(output_content[0]["@optype"], "continuous")
      self.assertEqual(output_content[1]["@name"], "Reason Code 1")
      self.assertEqual(output_content[1]["@feature"], "reasonCode")
      self.assertEqual(output_content[1]["@dataType"], "string")
      self.assertEqual(output_content[1]["@optype"], "categorical")
  
file_path: AIX360/tests/rule_induction/trxf/pmml_export/test_nyoka_serialize_scorecard.py
imports: import datetime
  import random
  import unittest
  import dataclasses
  import xmltodict
  import aix360.algorithms.rule_induction.trxf.pmml_export.models
  import aix360.algorithms.rule_induction.trxf.pmml_export.serializer
label_desc: Use image node_id 2 for calling the TestNyokaSerializer obj's underlying member method code with example usage: obj.test_serialize_output_tag() without return types