code: def test_gnp_generators_basic(generator, directed):
      """If the edge probability `p` is >0 and <1, test only the basic properties."""
      G = generator(10, 0.1, directed=directed)
      assert len(G) == 10
      assert G.is_directed() == directed
  
imports: import pytest
  import networkx
label_desc: Use image node_id 3 for calling a global function with example usage: test_gnp_generators_basic(generator, directed) without return types