code: def test_from_networkx_heterogeneous_features(feature_type, dtype):
      a_features = [[0, 1, 2], [3, 4, 5]]
      b_features = [[6, 7, 8, 9]]
      # node type c has no features
  
      def node(i, feats, **kwargs):
          feat = {"f": feats} if feature_type == "nodes" else {}
          return (i, {**kwargs, **feat})
  
      # make sure the default node type is applied correctly
      a_nodes = [node(0, a_features[0]), node(2, a_features[1], n="a")]
      b_nodes = [node(1, b_features[0], n="b")]
      c_nodes = [(3, {"n": "c"})]
  
      if feature_type == "nodes":
          node_features = "f"
      elif feature_type == "dataframe":
          node_features = {
              "a": pd.DataFrame(a_features, index=[0, 2]),
              "b": pd.DataFrame(b_features, index=[1]),
              # c is implied
          }
      elif feature_type == "iterable no types":
          node_features = zip(
              [0, 2, 1, 3], a_features + b_features + [[]]
          )
      elif feature_type == "iterable types":
          node_features = {
              "a": zip([0, 2], a_features),
              "b": zip([1], b_features),
              "c": [(3, [])],
          }
  
      expected_nodes = {
          "a": pd.DataFrame(a_features, index=[0, 2], dtype=dtype),
          "b": pd.DataFrame(b_features, index=[1], dtype=dtype),
          "c": pd.DataFrame(columns=range(0), index=[3], dtype=dtype),
      }
  
      g = nx.MultiDiGraph()
      g.add_nodes_from(a_nodes + b_nodes + c_nodes)
      nodes, edges = from_networkx_for_testing(g, node_features, dtype)
      assert_dataframe_dict_equal(nodes, expected_nodes)
      assert edges == {}
  
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 25 for calling a global function with example usage: test_from_networkx_heterogeneous_features(feature_type, dtype) and returns: i,  dict