code: def test_features_agg(self):
      sv_true = pd.DataFrame(
          {
              "color": ["b", "g", "g", "r"],
              "size": [2, 1, 3, 1],
              "n_nodes": [1, 1, 2, 1],
              "time": [2, 0, 5, 9],
          }
      )
      sv_true.set_index(["color", "size"], inplace=True)
  
      se_true = pd.DataFrame(
          {
              "color_s": ["b", "g", "g", "g", "g", "g"],
              "color_t": ["g", "b", "g", "b", "g", "r"],
              "size_s": [2, 1, 1, 3, 3, 3],
              "size_t": [3, 2, 3, 2, 3, 1],
              "n_edges": [1, 1, 2, 1, 1, 1],
              "dt": [3.0, 2.0, 3.0, 1.0, 4.0, 4.0],
          }
      )
      se_true.set_index(
          ["color_s", "size_s", "color_t", "size_t"], inplace=True
      )
  
      sv_test, se_test = g.partition_graph(
          ["color", "size"],
          feature_funcs={"time": "max"},
          relation_funcs={"dt": "mean"},
      )
  
      assert_frame_equal(
          sv_test.sort_index(axis=1), sv_true.sort_index(axis=1)
      )
      assert_frame_equal(
          se_test.sort_index(axis=1), se_true.sort_index(axis=1)
      )
  
imports: import pytest
  import numpy
  import pandas
  from pandas.testing import assert_frame_equal
  from numpy.testing import assert_allclose
  from deepgraph import DeepGraph
label_desc: Use image node_id 2 for calling the TestPartitionGraph obj's underlying member method code with example usage: obj.test_features_agg() without return types