code: def test_ellip_harm_invalid_p():
      # Regression test. This should return nan.
      n = 4
      # Make p > 2*n + 1.
      p = 2 * n + 2
      result = ellip_harm(0.5, 2.0, n, p, 0.2)
      assert np.isnan(result)
  
file_path: scipy/scipy/special/tests/test_ellip_harm.py
imports: import numpy
  from numpy.testing import assert_equal, assert_almost_equal, assert_allclose, assert_, suppress_warnings
  from scipy.special._testutils import assert_func_equal
  from scipy.special import ellip_harm, ellip_harm_2, ellip_normal
  from scipy.integrate import IntegrationWarning
  from numpy import sqrt, pi
label_desc: Use image node_id 5 for calling a global function with example usage: test_ellip_harm_invalid_p() without return types