code: def test_th_improvement_rate__optimized_th_is_zero(self):
      original_th = 1.0
      optimized_th = 0.0
      res = OptimizeInferenceResult(
          original_model=MagicMock(throughput=original_th),
          hardware_setup=MagicMock(),
          optimized_model=MagicMock(throughput=optimized_th),
      )
      self.assertEqual(0, res.throughput_improvement_rate)
  
imports: import unittest
  from unittest.mock import MagicMock
  from nebullvm.core.models import OptimizeInferenceResult
label_desc: Use image node_id 7 for calling the TestOptimizeInferenceResult obj's underlying member method code with example usage: obj.test_th_improvement_rate__optimized_th_is_zero() without return types