class_docstr: Unit tests for the :func:`~networkx.stochastic_graph` function.
code: def test_graph_disallowed(self):
      with pytest.raises(nx.NetworkXNotImplemented):
          nx.stochastic_graph(nx.Graph())
  
file_path: networkx/networkx/generators/tests/test_stochastic.py
imports: import pytest
  import networkx
label_desc: Use image node_id 6 for calling the TestStochasticGraph obj's underlying member method code with example usage: obj.test_graph_disallowed() without return types