code: def test_transform_partial_failure(op, request):
      # GH 35964
      if op in ("ffill", "bfill", "pad", "backfill", "shift"):
          request.applymarker(
              pytest.mark.xfail(
                  reason=f"{op} is successful on any dtype"
              )
          )
  
      # Using object makes most transform kernels fail
      ser = Series(3 * [object])
  
      if op in ("fillna", "ngroup"):
          error = ValueError
          msg = "Transform function failed"
      else:
          error = TypeError
          msg = "|".join(
              [
                  "not supported between instances of 'type' and 'type'",
                  "unsupported operand type",
              ]
          )
  
      with pytest.raises(error, match=msg):
          ser.transform([op, "shift"])
  
      with pytest.raises(error, match=msg):
          ser.transform({"A": op, "B": "shift"})
  
      with pytest.raises(error, match=msg):
          ser.transform({"A": [op], "B": ["shift"]})
  
      with pytest.raises(error, match=msg):
          ser.transform({"A": [op, "shift"], "B": [op]})
  
imports: import numpy
  import pytest
  import pandas
  from pandas import DataFrame, Index, MultiIndex, Series, concat, date_range, timedelta_range
  import pandas._testing
  from pandas.tests.apply.common import series_transform_kernels
label_desc: Use image node_id 20 for calling a global function with example usage: test_transform_partial_failure(op, request) without return types