code: def agg_wrapper(feats, time_last):
      def wrap(df):
          d = {}
          feature_values = []
          for f in feats:
              func = f.get_function()
              column_ids = [bf.get_name() for bf in f.base_features]
              args = [df[v] for v in column_ids]
  
              if f.primitive.uses_calc_time:
                  values = func(*args, time=time_last)
              else:
                  values = func(*args)
  
              if f.number_output_features == 1:
                  values = [values]
              feature_values.append((f, values))
  
          d = update_feature_columns(feature_values, d)
  
          return pd.Series(d)
  
      return wrap
  
imports: from datetime import datetime
  from functools import partial
  import numpy
  import pandas
  import pandas.api.types
  from featuretools.entityset.relationship import RelationshipPath
  from featuretools.exceptions import UnknownFeature
  from featuretools.feature_base import AggregationFeature, DirectFeature, GroupByTransformFeature, IdentityFeature, TransformFeature
  from featuretools.utils import Trie
  from featuretools.utils.gen_utils import Library, get_relationship_column_id, import_or_none, is_instance
label_desc: Use image node_id 2 for calling a global function with example usage: agg_wrapper(feats, time_last) and returns: wrap, pd