code: def test_convert_edges_type_column(edge_features):
      data = pd.DataFrame(
          {
              "s": [10, 20, 30, 40, 50],
              "t": [20, 30, 40, 50, 60],
              "l": ["c", "a", "a", "c", "b"],
          }
      )
      if edge_features:
          data["a"] = np.arange(5)
          data["b"] = -np.arange(5) / 4.0
  
      nodes = pd.DataFrame([], index=[10, 20, 30, 40, 50, 60])
      nodes = convert_nodes(
          nodes, name="other_name", default_type=np.int8, dtype=np.int8
      )
  
      edges = convert_edges(
          data,
          name="some_name",
          default_type="d",
          source_column="s",
          target_column="t",
          weight_column="w",
          type_column="l",
          nodes=nodes,
          dtype=np.float32,
      )
  
      np.testing.assert_array_equal(edges.sources, [1, 2, 4, 0, 3])
      np.testing.assert_array_equal(edges.targets, [2, 3, 5, 1, 4])
      np.testing.assert_array_equal(
          edges.type_of_iloc(slice(None)), ["a", "a", "b", "c", "c"]
      )
  
      if edge_features:
          np.testing.assert_array_equal(
              edges.features_of_type("a"), [[1.0, -0.25], [2.0, -0.5]]
          )
          np.testing.assert_array_equal(
              edges.features_of_type("b"), [[4.0, -1.0]]
          )
          np.testing.assert_array_equal(
              edges.features_of_type("c"), [[0.0, 0.0], [3.0, -0.75]]
          )
      else:
          np.testing.assert_array_equal(
              edges.features_of_type("a"), _empty_array(2)
          )
          np.testing.assert_array_equal(
              edges.features_of_type("b"), _empty_array(1)
          )
          np.testing.assert_array_equal(
              edges.features_of_type("c"), _empty_array(2)
          )
  
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 16 for calling a global function with example usage: test_convert_edges_type_column(edge_features) without return types