code: def test_sample_odds_ratio_ci(self, case):
      # Compare the sample odds ratio confidence interval to the R function
      # oddsratio.wald from the epitools package, e.g.
      # > library(epitools)
      # > table = matrix(c(10, 20, 41, 93), nrow=2, ncol=2, byrow=TRUE)
      # > result = oddsratio.wald(table)
      # > result$measure
      #           odds ratio with 95% C.I.
      # Predictor  estimate     lower    upper
      #   Exposed1 1.000000        NA       NA
      #   Exposed2 1.134146 0.4879913 2.635883
  
      confidence_level, alternative, ref_low, ref_high = case
      table = [[10, 20], [41, 93]]
      result = odds_ratio(table, kind="sample")
      assert_allclose(result.statistic, 1.134146, rtol=1e-6)
      ci = result.confidence_interval(confidence_level, alternative)
      assert_allclose([ci.low, ci.high], [ref_low, ref_high], rtol=1e-6)
  
file_path: scipy/scipy/stats/tests/test_odds_ratio.py
imports: import pytest
  import numpy
  from numpy.testing import assert_equal, assert_allclose
  from .._discrete_distns import nchypergeom_fisher, hypergeom
  from scipy.stats._odds_ratio import odds_ratio
  from .data.fisher_exact_results_from_r import data
label_desc: Use image node_id 3 for calling the TestOddsRatio obj's underlying member method code with example usage: obj.test_sample_odds_ratio_ci(case) without return types