code: def test_exceptions():
      """Bad input should raise exception."""
      G = nx.florentine_families_graph()
      pytest.raises(
          nx.NetworkXUnfeasible,
          nx.maximal_independent_set,
          G,
          ["Smith"],
      )
      pytest.raises(
          nx.NetworkXUnfeasible,
          nx.maximal_independent_set,
          G,
          ["Salviati", "Pazzi"],
      )
      # MaximalIndependentSet is not implemented for directed graphs
      pytest.raises(
          nx.NetworkXNotImplemented,
          nx.maximal_independent_set,
          nx.DiGraph(G),
      )
  
file_path: networkx/networkx/algorithms/tests/test_mis.py
imports: import random
  import pytest
  import networkx
label_desc: Use image node_id 3 for calling a global function with example usage: test_exceptions() without return types