code: def unpack_obj(obj, klass, axis):
      """
      Helper to ensure we have the right type of object for a test parametrized
      over frame_or_series.
      """
      if klass is not DataFrame:
          obj = obj["A"]
          if axis != 0:
              pytest.skip(
                  f"Test is only for DataFrame with axis={axis}"
              )
      return obj
  
file_path: pandas/pandas/tests/apply/test_frame_transform.py
imports: import numpy
  import pytest
  from pandas import DataFrame, MultiIndex, Series
  import pandas._testing
  from pandas.tests.apply.common import frame_transform_kernels
  from pandas.tests.frame.common import zip_frames
label_desc: Use image node_id 1 for calling a global function with example usage: unpack_obj(obj, klass, axis) and returns: obj