code: def test_brunnermunzel_one_sided():
      # copied from scipy with adjustment
      x = [1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 1, 1]
      y = [3, 3, 4, 3, 1, 2, 3, 1, 1, 5, 4]
      significant = 13
  
      # revere direction to match our definition
      x, y = y, x
  
      # Results are compared with R's lawstat package.
      u1, p1 = rank_compare_2indep(x, y).test_prob_superior(
          alternative="smaller"
      )
      u2, p2 = rank_compare_2indep(y, x).test_prob_superior(
          alternative="larger"
      )
      u3, p3 = rank_compare_2indep(x, y).test_prob_superior(
          alternative="larger"
      )
      u4, p4 = rank_compare_2indep(y, x).test_prob_superior(
          alternative="smaller"
      )
  
      assert_approx_equal(p1, p2, significant=significant)
      assert_approx_equal(p3, p4, significant=significant)
      assert_(p1 != p3)
      assert_approx_equal(
          u1, 3.1374674823029505, significant=significant
      )
      assert_approx_equal(
          u2, -3.1374674823029505, significant=significant
      )
      assert_approx_equal(
          u3, 3.1374674823029505, significant=significant
      )
      assert_approx_equal(
          u4, -3.1374674823029505, significant=significant
      )
  
      # Note: scipy and lawstat tail is reversed compared to test statistic
      assert_approx_equal(
          p3, 0.0028931043330757342, significant=significant
      )
      assert_approx_equal(
          p1, 0.99710689566692423, significant=significant
      )
  
imports: from statsmodels.compat.python import lzip
  import numpy
  from numpy.testing import assert_allclose, assert_almost_equal, assert_approx_equal, assert_
  from scipy import stats
  import pytest
  from statsmodels.stats.contingency_tables import mcnemar, cochrans_q, SquareTable
  from statsmodels.sandbox.stats.runs import Runs, runstest_1samp, runstest_2samp
  from statsmodels.sandbox.stats.runs import mcnemar
  from statsmodels.stats.nonparametric import rank_compare_2indep, rank_compare_2ordinal, prob_larger_continuous, cohensd2problarger
  from statsmodels.tools.testing import Holder
label_desc: Use image node_id 11 for calling a global function with example usage: test_brunnermunzel_one_sided() without return types