code: def from_networkx_for_testing(g, node_features=None, dtype="float32"):
      return from_networkx(
          g,
          node_type_attr="n",
          edge_type_attr="e",
          node_type_default="a",
          edge_type_default="x",
          edge_weight_attr="w",
          node_features=node_features,
          dtype=dtype,
      )
  
imports: import networkx
  import numpy
  import pandas
  import pytest
  from stellargraph.core.convert import ColumnarConverter, convert_nodes, convert_edges, from_networkx
  from stellargraph.core.indexed_array import IndexedArray
label_desc: Use image node_id 17 for calling a global function with example usage: from_networkx_for_testing(g, node_features, dtype) and returns: from_networkx