code: def test_max_invalid_shapes_and_axis(
      device, array, axis, dtype, is_module
  ):
      a = chainerx.array(array).astype(dtype)
      with pytest.raises(chainerx.DimensionError):
          if is_module:
              chainerx.max(a, axis)
          else:
              a.max(axis)
  
imports: import chainer
  import numpy
  import pytest
  import chainerx
  import chainerx.testing
  from chainerx_tests import array_utils
  from chainerx_tests import dtype_utils
  from chainerx_tests import math_utils
  from chainerx_tests import op_utils
label_desc: Use image node_id 2 for calling a global function with example usage: test_max_invalid_shapes_and_axis(device, array, axis, dtype, is_module) without return types