code: def test_columnar_convert_type_column():
      converter = ColumnarConverter(
          name="some_name",
          default_type="foo",
          type_column="type_column",
          column_defaults={},
          selected_columns={"type_column": "TC", "data": "D"},
          transform_columns={},
      )
  
      df = pd.DataFrame(
          {
              "type_column": ["c", "a", "a", "c", "b"],
              "data": [1, 2, 3, 4, 5],
          },
          index=[1, 10, 100, 1000, 10000],
      )
      ids, columns, type_info = converter.convert(df)
  
      assert columns.keys() == {"D"}
      np.testing.assert_array_equal(ids, [10, 100, 10000, 1, 1000])
      np.testing.assert_array_equal(columns["D"], [2, 3, 5, 1, 4])
      _check_type_info(
          type_info,
          [
              ("a", _empty_array(2)),
              ("b", _empty_array(1)),
              ("c", _empty_array(2)),
          ],
      )
  
      # invalid configuration
      with pytest.raises(
          ValueError,
          match=r"selected_columns: expected type column \('type_column'\) .* found only 'TC', 'data'",
      ):
          ColumnarConverter(
              name="some_name",
              default_type="foo",
              type_column="type_column",
              column_defaults={},
              selected_columns={"TC": "type_column", "data": "D"},
              transform_columns={},
          )
  
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 10 for calling a global function with example usage: test_columnar_convert_type_column() without return types