code: def test_marginal_effects(self) -> None:
      df = pd.DataFrame(
          {
              "mean": [1, 2, 3, 4],
              "sem": [0.1, 0.1, 0.1, 0.1],
              "factor_1": ["a", "a", "b", "b"],
              "factor_2": ["A", "B", "A", "B"],
          }
      )
      fx = marginal_effects(df)
      self.assertTrue(
          np.allclose(fx["Beta"].values, [-40, 40, -20, 20], atol=1e-3)
      )
      self.assertTrue(
          np.allclose(fx["SE"].values, [2.83] * 4, atol=1e-2)
      )
  
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 MarginalEffectsTest obj's underlying member method code with example usage: obj.test_marginal_effects() without return types