code: def test_groupby_multi_output_stacking(pd_es):
      class TestTime(TransformPrimitive):
          name = "test_time"
          input_types = [ColumnSchema(logical_type=Datetime)]
          return_type = ColumnSchema(semantic_tags={"numeric"})
          number_output_features = 6
  
      fl = dfs(
          entityset=pd_es,
          target_dataframe_name="sessions",
          agg_primitives=["sum"],
          groupby_trans_primitives=[TestTime],
          features_only=True,
          max_depth=4,
      )
  
      for i in range(6):
          f = "SUM(log.TEST_TIME(datetime)[%d] by product_id)" % i
          assert feature_with_name(fl, f)
          assert (
              "customers.SUM(log.TEST_TIME(datetime)[%d] by session_id)"
              % i
          ) in fl
  
imports: import numpy
  import pandas
  from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import Datetime
  from featuretools import Feature, GroupByTransformFeature, IdentityFeature, calculate_feature_matrix, feature_base
  from featuretools.computational_backends.feature_set import FeatureSet
  from featuretools.computational_backends.feature_set_calculator import FeatureSetCalculator
  from featuretools.primitives import CumCount, CumMax, CumMean, CumMin, CumSum, Last
  from featuretools.primitives.base import TransformPrimitive
  from featuretools.synthesis import dfs
  from featuretools.tests.testing_utils import feature_with_name
label_desc: Use image node_id 12 for calling a global function with example usage: test_groupby_multi_output_stacking(pd_es) without return types