class_docstr: Unit tests for the
  :func:`networkx.generators.duplication.partial_duplication_graph`
  function.
code: def test_invalid_probabilities(self):
      N = 1
      n = 1
      for p, q in [(0.5, 2), (0.5, -1), (2, 0.5), (-1, 0.5)]:
          args = (N, n, p, q)
          pytest.raises(NetworkXError, partial_duplication_graph, *args)
  
file_path: networkx/networkx/generators/tests/test_duplication.py
imports: import pytest
  from networkx.exception import NetworkXError
  from networkx.generators.duplication import duplication_divergence_graph, partial_duplication_graph
label_desc: Use image node_id 4 for calling the TestPartialDuplicationGraph obj's underlying member method code with example usage: obj.test_invalid_probabilities() without return types