code: def df_varargs_api(
      f: Callable[..., DataFrame]
  ) -> Callable[..., DataFrame]:
      def _api(self: "GroupedData", *cols: str) -> DataFrame:
          name = f.__name__
          jdf = getattr(self._jgd, name)(
              _to_seq(self.session._sc, cols)
          )
          return DataFrame(jdf, self.session)
  
      _api.__name__ = f.__name__
      _api.__doc__ = f.__doc__
      return _api
  
imports: import sys
  from typing import Callable, List, Optional, TYPE_CHECKING, overload, Dict, Union, cast, Tuple
  from py4j.java_gateway import JavaObject
  from pyspark.sql.column import Column, _to_seq
  from pyspark.sql.session import SparkSession
  from pyspark.sql.dataframe import DataFrame
  from pyspark.sql.pandas.group_ops import PandasGroupedOpsMixin
label_desc: Use image node_id 2 for calling a global function with example usage: df_varargs_api(f) and returns: _api, DataFrame