code: def test_result_type_error(result_type):
      # allowed result_type
      df = DataFrame(
          np.tile(np.arange(3, dtype="int64"), 6).reshape(6, -1) + 1,
          columns=["A", "B", "C"],
      )
  
      msg = (
          "invalid value for result_type, must be one of "
          "{None, 'reduce', 'broadcast', 'expand'}"
      )
      with pytest.raises(ValueError, match=msg):
          df.apply(lambda x: [1, 2, 3], axis=1, result_type=result_type)
  
imports: from itertools import chain
  import re
  import numpy
  import pytest
  from pandas.errors import SpecificationError
  from pandas import DataFrame, Series, date_range
  import pandas._testing
label_desc: Use image node_id 1 for calling a global function with example usage: test_result_type_error(result_type) without return types