code: def test_budget_scopes(self):
      budget_accountant = NaiveBudgetAccountant(
          total_epsilon=1, total_delta=1e-6
      )
  
      with budget_accountant.scope(weight=0.4):
          budget1 = budget_accountant.request_budget(
              mechanism_type=MechanismType.LAPLACE
          )
          budget2 = budget_accountant.request_budget(
              mechanism_type=MechanismType.LAPLACE, weight=3
          )
  
      with budget_accountant.scope(weight=0.6):
          budget3 = budget_accountant.request_budget(
              mechanism_type=MechanismType.LAPLACE
          )
          budget4 = budget_accountant.request_budget(
              mechanism_type=MechanismType.LAPLACE, weight=4
          )
  
      budget_accountant.compute_budgets()
  
      self.assertEqual(budget1.eps, 0.4 * (1 / 4))
      self.assertEqual(budget2.eps, 0.4 * (3 / 4))
      self.assertEqual(budget3.eps, 0.6 * (1 / 5))
      self.assertEqual(budget4.eps, 0.6 * (4 / 5))
  
imports: import sys
  import unittest
  from dataclasses import dataclass
  from pipeline_dp.budget_accounting import MechanismSpec
  from pipeline_dp.aggregate_params import MechanismType
  from pipeline_dp.budget_accounting import NaiveBudgetAccountant
  from pipeline_dp.budget_accounting import PLDBudgetAccountant
  from absl.testing import parameterized
label_desc: Use image node_id 4 for calling the NaiveBudgetAccountantTest obj's underlying member method code with example usage: obj.test_budget_scopes() without return types