code: def test_repeated_features(self):
      mock_feature = Feature("feature")
      partitions = [
          sc.Partition(
              [
                  sc.LinearIntervalBin(
                      mock_feature, 0.0, 0.0, -1.0, 0.0
                  ),
                  sc.LinearIntervalBin(
                      mock_feature, 0.0, 0.0, 0.0, 1.0
                  ),
              ]
          )
      ]
      scorecard = sc.Scorecard(partitions)
      self.assertEqual(scorecard.num_features, 1)
  
      mock_feature1 = Feature("feature1")
      mock_feature2 = Feature("feature2")
      partitions = [
          sc.Partition(
              [
                  sc.LinearIntervalBin(
                      mock_feature1, 0.0, 0.0, -1.0, 0.0
                  ),
                  sc.LinearIntervalBin(
                      mock_feature1, 0.0, 0.0, 0.0, 1.0
                  ),
              ]
          ),
          sc.Partition(
              [
                  sc.SetBin(mock_feature2, 0.0, {-1.0, 0.0}),
                  sc.SetBin(mock_feature2, 0.0, {1.0, 2.0}),
              ]
          ),
      ]
      scorecard = sc.Scorecard(partitions)
      self.assertEqual(scorecard.num_features, 2)
  
      mock_feature = Feature("feature")
      partitions = [
          sc.Partition(
              [
                  sc.LinearIntervalBin(
                      mock_feature, 0.0, 0.0, -1.0, 0.0
                  ),
                  sc.LinearIntervalBin(
                      mock_feature, 0.0, 0.0, 0.0, 1.0
                  ),
              ]
          ),
          sc.Partition(
              [
                  sc.LinearIntervalBin(
                      mock_feature, 0.0, 0.0, -1.0, 0.0
                  ),
                  sc.LinearIntervalBin(
                      mock_feature, 0.0, 0.0, 1.0, 2.0
                  ),
              ]
          ),
      ]
      self.assertRaises(ValueError, sc.Scorecard, partitions)
  
      mock_feature = Feature("feature")
      partitions = [
          sc.Partition(
              [
                  sc.LinearIntervalBin(
                      mock_feature, 0.0, 0.0, -1.0, 0.0
                  ),
                  sc.LinearIntervalBin(
                      mock_feature, 0.0, 0.0, 0.0, 1.0
                  ),
              ]
          ),
          sc.Partition(
              [
                  sc.SetBin(mock_feature, 0.0, {-1.0, 0.0}),
                  sc.SetBin(mock_feature, 0.0, {1.0, 2.0}),
              ]
          ),
      ]
      self.assertRaises(ValueError, sc.Scorecard, partitions)
  
      mock_feature1 = Feature("feature1")
      mock_feature2 = Feature("feature2")
      partitions = [
          sc.Partition(
              [
                  sc.LinearIntervalBin(
                      mock_feature1, 0.0, 0.0, -1.0, 0.0
                  ),
                  sc.LinearIntervalBin(
                      mock_feature1, 0.0, 0.0, 0.0, 1.0
                  ),
              ]
          ),
          sc.Partition(
              [
                  sc.LinearIntervalBin(
                      mock_feature2, 0.0, 0.0, -1.0, 0.0
                  ),
                  sc.LinearIntervalBin(
                      mock_feature2, 0.0, 0.0, 1.0, 2.0
                  ),
              ]
          ),
          sc.Partition(
              [
                  sc.LinearIntervalBin(
                      mock_feature1, 0.0, 0.0, -2.0, -1.0
                  ),
                  sc.LinearIntervalBin(
                      mock_feature1, 0.0, 0.0, 5.0, 10.0
                  ),
              ]
          ),
      ]
      self.assertRaises(ValueError, sc.Scorecard, partitions)
  
file_path: AIX360/tests/rule_induction/trxf/scorecard/test_scorecard.py
imports: from unittest import TestCase
  from unittest.mock import MagicMock
  import aix360.algorithms.rule_induction.trxf.scorecard
  from aix360.algorithms.rule_induction.trxf.core import Feature
label_desc: Use image node_id 2 for calling the TestScorecard obj's underlying member method code with example usage: obj.test_repeated_features() without return types