code: def test_exceptions(self):
      G = nx.Graph()
      pytest.raises(nx.NetworkXNotImplemented, nx.network_simplex, G)
      pytest.raises(nx.NetworkXNotImplemented, nx.capacity_scaling, G)
      G = nx.MultiGraph()
      pytest.raises(nx.NetworkXNotImplemented, nx.network_simplex, G)
      pytest.raises(nx.NetworkXNotImplemented, nx.capacity_scaling, G)
      G = nx.DiGraph()
      pytest.raises(nx.NetworkXError, nx.network_simplex, G)
      # pytest.raises(nx.NetworkXError, nx.capacity_scaling, G)
      G.add_node(0, demand=float("inf"))
      pytest.raises(nx.NetworkXError, nx.network_simplex, G)
      pytest.raises(nx.NetworkXUnfeasible, nx.capacity_scaling, G)
      G.nodes[0]["demand"] = 0
      G.add_node(1, demand=0)
      G.add_edge(0, 1, weight=-float("inf"))
      pytest.raises(nx.NetworkXError, nx.network_simplex, G)
      pytest.raises(nx.NetworkXUnfeasible, nx.capacity_scaling, G)
      G[0][1]["weight"] = 0
      G.add_edge(0, 0, weight=float("inf"))
      pytest.raises(nx.NetworkXError, nx.network_simplex, G)
      # pytest.raises(nx.NetworkXError, nx.capacity_scaling, G)
      G[0][0]["weight"] = 0
      G[0][1]["capacity"] = -1
      pytest.raises(nx.NetworkXUnfeasible, nx.network_simplex, G)
      # pytest.raises(nx.NetworkXUnfeasible, nx.capacity_scaling, G)
      G[0][1]["capacity"] = 0
      G[0][0]["capacity"] = -1
      pytest.raises(nx.NetworkXUnfeasible, nx.network_simplex, G)
  
imports: import bz2
  import importlib.resources
  import os
  import pickle
  import pytest
  import networkx
label_desc: Use image node_id 18 for calling the TestMinCostFlow obj's underlying member method code with example usage: obj.test_exceptions() without return types