code: def test_generic_multitype():
      nxg = nx.graphviews
      G = nx.DiGraph([(1, 2)])
      with pytest.raises(nx.NetworkXError):
          nxg.generic_graph_view(G, create_using=nx.MultiGraph)
      G = nx.MultiDiGraph([(1, 2)])
      with pytest.raises(nx.NetworkXError):
          nxg.generic_graph_view(G, create_using=nx.DiGraph)
  
imports: import pytest
  import networkx
  from networkx.utils import edges_equal, nodes_equal
label_desc: Use image node_id 1 for calling a global function with example usage: test_generic_multitype() without return types