code: def frame_apply(
      obj,
      func,
      axis=0,
      broadcast=None,
      raw=False,
      reduce=None,
      result_type=None,
      ignore_failures=False,
      args=None,
      kwds=None,
  ):
      """construct and return a row or column based frame apply object"""
  
      axis = obj._get_axis_number(axis)
      if axis == 0:
          klass = FrameRowApply
      elif axis == 1:
          klass = FrameColumnApply
  
      return klass(
          obj,
          func,
          broadcast=broadcast,
          raw=raw,
          reduce=reduce,
          result_type=result_type,
          ignore_failures=ignore_failures,
          args=args,
          kwds=kwds,
      )
  
imports: import warnings
  import numpy
  from pandas._libs import reduction
  import pandas.compat
  from pandas.util._decorators import cache_readonly
  from pandas.core.dtypes.common import is_dict_like, is_extension_type, is_list_like, is_sequence
  from pandas.core.dtypes.generic import ABCSeries
  from pandas.io.formats.printing import pprint_thing
label_desc: Use image node_id 1 for calling a global function with example usage: frame_apply(obj, func, axis, broadcast, raw, reduce, result_type, ignore_failures, args, kwds) and returns: klass