code: def test_benchmark(self, case, wrt, benchmark):
      a1, a2, b1, z = pt.scalars("a1", "a2", "b1", "z")
      hyp2f1_out = pt.hyp2f1(a1, a2, b1, z)
      hyp2f1_grad = pt.grad(
          hyp2f1_out, wrt=a1 if wrt == "a" else [a1, a2, b1, z]
      )
      f_grad = function([a1, a2, b1, z], hyp2f1_grad)
  
      (test_a1, test_a2, test_b1, test_z, *expected_dds) = case
  
      result = benchmark(f_grad, test_a1, test_a2, test_b1, test_z)
  
      rtol = 1e-9 if config.floatX == "float64" else 2e-3
      expected_result = (
          expected_dds[0] if wrt == "a" else np.array(expected_dds)
      )
      np.testing.assert_allclose(
          result,
          expected_result,
          rtol=rtol,
      )
  
imports: import warnings
  import numpy
  import pytest
  from pytensor.gradient import verify_grad
  from pytensor.scalar import ScalarLoop
  from pytensor.tensor.elemwise import Elemwise
  from functools import partial
  import scipy.special
  import scipy.stats
  from pytensor import function, grad
  from pytensor import tensor
  from pytensor.compile.mode import get_default_mode
  from pytensor.configdefaults import config
  from pytensor.tensor import gammaincc, inplace, vector
  from tests import unittest_tools
  from tests.tensor.utils import _good_broadcast_unary_chi2sf, _good_broadcast_unary_normal, _good_broadcast_unary_normal_float, _good_broadcast_unary_normal_float_no_complex, _good_broadcast_unary_normal_float_no_complex_small_neg_range, _good_broadcast_unary_normal_no_complex, _grad_broadcast_unary_0_2_no_complex, _grad_broadcast_unary_abs1_no_complex, _grad_broadcast_unary_normal, _grad_broadcast_unary_normal_small_neg_range, check_floatX, copymod, integers_ranged, makeBroadcastTester, random_ranged, upcast_int8_nfunc
label_desc: Use image node_id 2 for calling the TestHyp2F1Grad obj's underlying member method code with example usage: obj.test_benchmark(case, wrt, benchmark) without return types