code: def test_from_networkx_non_consecutive():
      import networkx as nx
  
      graph = nx.Graph()
      graph.add_node(4)
      graph.add_node(2)
      graph.add_edge(4, 2)
      for node in graph.nodes():
          graph.nodes[node]["x"] = node
  
      data = from_networkx(graph)
      assert len(data) == 2
      assert data.x.tolist() == [4, 2]
      assert data.edge_index.tolist() == [[0, 1], [1, 0]]
  
imports: import pytest
  import scipy.sparse
  import torch
  from torch_geometric.data import Data, HeteroData
  from torch_geometric.testing import get_random_edge_index, withPackage
  from torch_geometric.utils import from_cugraph, from_dgl, from_networkit, from_networkx, from_scipy_sparse_matrix, from_trimesh, sort_edge_index, subgraph, to_cugraph, to_dgl, to_networkit, to_networkx, to_scipy_sparse_matrix, to_trimesh
label_desc: Use image node_id 11 for calling a global function with example usage: test_from_networkx_non_consecutive() without return types