code: def test_relativize_data(self) -> None:
      data = Data(
          df=pd.DataFrame(
              [
                  {
                      "mean": 2,
                      "sem": 0,
                      "metric_name": "foobar",
                      "arm_name": "status_quo",
                  },
                  {
                      "mean": 5,
                      "sem": 0,
                      "metric_name": "foobaz",
                      "arm_name": "status_quo",
                  },
                  {
                      "mean": 1,
                      "sem": 0,
                      "metric_name": "foobar",
                      "arm_name": "0_0",
                  },
                  {
                      "mean": 10,
                      "sem": 0,
                      "metric_name": "foobaz",
                      "arm_name": "0_0",
                  },
              ]
          )
      )
      expected_relativized_data = Data(
          df=pd.DataFrame(
              [
                  {
                      "mean": -0.5,
                      "sem": 0,
                      "metric_name": "foobar",
                      "arm_name": "0_0",
                  },
                  {
                      "mean": 1,
                      "sem": 0,
                      "metric_name": "foobaz",
                      "arm_name": "0_0",
                  },
              ]
          )
      )
      expected_relativized_data_with_sq = Data(
          df=pd.DataFrame(
              [
                  {
                      "mean": 0,
                      "sem": 0,
                      "metric_name": "foobar",
                      "arm_name": "status_quo",
                  },
                  {
                      "mean": -0.5,
                      "sem": 0,
                      "metric_name": "foobar",
                      "arm_name": "0_0",
                  },
                  {
                      "mean": 0,
                      "sem": 0,
                      "metric_name": "foobaz",
                      "arm_name": "status_quo",
                  },
                  {
                      "mean": 1,
                      "sem": 0,
                      "metric_name": "foobaz",
                      "arm_name": "0_0",
                  },
              ]
          )
      )
  
      actual_relativized_data = relativize_data(data=data)
      self.assertEqual(
          expected_relativized_data, actual_relativized_data
      )
  
      actual_relativized_data_with_sq = relativize_data(
          data=data, include_sq=True
      )
      self.assertEqual(
          expected_relativized_data_with_sq,
          actual_relativized_data_with_sq,
      )
  
imports: from itertools import product
  import numpy
  import pandas
  from ax.core.data import Data
  from ax.utils.common.testutils import TestCase
  from ax.utils.stats.statstools import inverse_variance_weight, marginal_effects, relativize, relativize_data, unrelativize
label_desc: Use image node_id 1 for calling the RelativizeDataTest obj's underlying member method code with example usage: obj.test_relativize_data() without return types