code: def test_ev_copula(case):
      # check ev copulas, cdf and transform against R `evd` package
      ev_tr, v1, v2, args, res1 = case
      res = copula_bv_ev([v1, v2], ev_tr, args=args)
      # assert_allclose(res, res1, rtol=1e-13)
  
      # check derivatives of dependence function
      if ev_tr in (trev.transform_bilogistic, trev.transform_tev):
          return
      d1_res = approx_fprime_cs(
          np.array([v1, v2]), ev_tr.evaluate, args=args
      )
      d1_res = np.diag(d1_res)
      d1 = ev_tr.deriv(np.array([v1, v2]), *args)
      assert_allclose(d1, d1_res, rtol=1e-8)
  
      d1_res = approx_hess(np.array([0.5]), ev_tr.evaluate, args=args)
      d1_res = np.diag(d1_res)
      d1 = ev_tr.deriv2(0.5, *args)
      assert_allclose(d1, d1_res, rtol=1e-7)
  
imports: import warnings
  from statsmodels.compat.pytest import pytest_warns
  from statsmodels.compat.scipy import SP_LT_15
  import numpy
  from numpy.testing import assert_allclose, assert_array_almost_equal
  import pytest
  from scipy import stats
  from statsmodels.distributions.copula.archimedean import ArchimedeanCopula, ClaytonCopula, FrankCopula, GumbelCopula, _debyem1_expansion
  from statsmodels.distributions.copula.copulas import CopulaDistribution
  import statsmodels.distributions.copula.depfunc_ev
  from statsmodels.distributions.copula.elliptical import GaussianCopula, StudentTCopula
  from statsmodels.distributions.copula.extreme_value import ExtremeValueCopula, copula_bv_ev
  from statsmodels.distributions.copula.other_copulas import IndependenceCopula
  import statsmodels.distributions.copula.transforms
  from statsmodels.distributions.tools import approx_copula_pdf, frequencies_fromdata
  from statsmodels.tools.numdiff import approx_fprime_cs, approx_hess
label_desc: Use image node_id 2 for calling a global function with example usage: test_ev_copula(case) without return types