code: def test_apply_invalid_axis_value():
      df = DataFrame(
          [[1, 2, 3], [4, 5, 6], [7, 8, 9]], index=["a", "a", "c"]
      )
      msg = "No axis named 2 for object type DataFrame"
      with pytest.raises(ValueError, match=msg):
          df.apply(lambda x: x, 2)
  
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 2 for calling a global function with example usage: test_apply_invalid_axis_value() without return types