code: def test_serialize_mining_schema(self):
      # arrange
      mining_schema = models.MiningSchema(
          miningFields=[
              models.MiningField(
                  name="toto0",
                  usageType=models.MiningFieldUsageType.active,
              ),
              models.MiningField(
                  name="toto1",
                  usageType=models.MiningFieldUsageType.target,
              ),
          ]
      )
      model = models.SimplePMMLRuleSetModel(
          dataDictionary=models.DataDictionary(dataFields=None),  # noqa
          ruleSetModel=models.RuleSetModel(
              miningSchema=mining_schema, ruleSet=None
          ),
      )  # noqa
  
      # when
      serialized = self.nyokaSerializer.serialize(model)
      res_data_dictionary_dict = xmltodict.parse(xml_input=serialized)[
          "PMML"
      ]["RuleSetModel"]["MiningSchema"]
  
      # assert
      expected = """
              <MiningSchema>
                  <MiningField name="toto0" usageType="active"/>
                  <MiningField name="toto1" usageType="target"/>
              </MiningSchema>
              """
      self.assertEqual(
          res_data_dictionary_dict,
          xmltodict.parse(xml_input=expected)["MiningSchema"],
      )
  
file_path: AIX360/tests/rule_induction/trxf/pmml_export/test_nyoka_serialize_common.py
imports: import datetime
  from unittest import TestCase
  import nyoka.base.constants
  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 5 for calling the TestNyokaSerializer obj's underlying member method code with example usage: obj.test_serialize_mining_schema() without return types