code: def test_bin_type_variation(self):
      mock_feature = Feature("feature")
      mock_bins = [
          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.LinearIntervalBin(mock_feature, 0.0, 0.0, 1.0, 2.0),
          sc.LinearIntervalBin(mock_feature, 0.0, 0.0, 2.0, 3.0),
      ]
      partition = sc.Partition(mock_bins)
      self.assertEqual(partition.num_bins, 4)
  
      mock_feature = Feature("feature")
      mock_bins = [
          sc.LinearIntervalBin(mock_feature, 0.0, 0.0, -1.0, 0.0),
          sc.SetBin(mock_feature, 0.0, {0.0, 0.5}),
          sc.LinearIntervalBin(mock_feature, 0.0, 0.0, 1.0, 2.0),
          sc.LinearIntervalBin(mock_feature, 0.0, 0.0, 2.0, 3.0),
      ]
      self.assertRaises(ValueError, sc.Partition, mock_bins)
  
      mock_feature = Feature("feature")
      mock_bins = [
          sc.LinearIntervalBin(mock_feature, 0.0, 0.0, -1.0, 0.0),
          sc.LinearIntervalBin(mock_feature, 0.0, 0.0, 1.0, 2.0),
          sc.IntervalBin(mock_feature, 0.0, 0.0, 1.0),
          sc.LinearIntervalBin(mock_feature, 0.0, 0.0, 2.0, 3.0),
      ]
      self.assertRaises(ValueError, sc.Partition, mock_bins)
  
file_path: AIX360/tests/rule_induction/trxf/scorecard/test_partition.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 TestPartition obj's underlying member method code with example usage: obj.test_bin_type_variation() without return types