code: def test_from_networkx_sbm(n, p, q):
      import networkx as nx
  
      G = nx.stochastic_block_model(
          sizes=[n // 2, n // 2],
          p=[[p, q], [q, p]],
          seed=0,
          directed=False,
      )
  
      data = from_networkx(G)
      assert data.num_nodes == 100
      assert torch.equal(data.block[:50], data.block.new_zeros(50))
      assert torch.equal(data.block[50:], data.block.new_ones(50))
  
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 17 for calling a global function with example usage: test_from_networkx_sbm(n, p, q) without return types