code: def test_from_edgelist_invalid_attr(self):
      pytest.raises(
          nx.NetworkXError,
          nx.from_pandas_edgelist,
          self.df,
          0,
          "b",
          "misspell",
      )
      pytest.raises(
          nx.NetworkXError, nx.from_pandas_edgelist, self.df, 0, "b", 1
      )
      # see Issue #3562
      edgeframe = pd.DataFrame(
          [[0, 1], [1, 2], [2, 0]], columns=["s", "t"]
      )
      pytest.raises(
          nx.NetworkXError,
          nx.from_pandas_edgelist,
          edgeframe,
          "s",
          "t",
          True,
      )
      pytest.raises(
          nx.NetworkXError,
          nx.from_pandas_edgelist,
          edgeframe,
          "s",
          "t",
          "weight",
      )
      pytest.raises(
          nx.NetworkXError,
          nx.from_pandas_edgelist,
          edgeframe,
          "s",
          "t",
          ["weight", "size"],
      )
  
imports: import pytest
  import networkx
  from networkx.utils import edges_equal, graphs_equal, nodes_equal
label_desc: Use image node_id 9 for calling the TestConvertPandas obj's underlying member method code with example usage: obj.test_from_edgelist_invalid_attr() without return types