code: def for_contiguous_axes(name="axis"):
      """Decorator for parametrizing tests with possible contiguous axes.
  
      Args:
          name(str): Argument name to which specified axis are passed.
  
      .. note::
          1. Adapted from tests/cupy_tests/fft_tests/test_fft.py.
          2. Example: for ``shape = (1, 2, 3)``, the tested axes are
              ``[(2,), (1, 2), (0, 1, 2)]`` for the C order, and
              ``[(0,), (0, 1), (0, 1, 2)]`` for the F order.
      """
  
      def decorator(impl):
          @_wraps_partial(impl, name)
          def test_func(self, *args, **kw):
              ndim = len(self.shape)
              order = self.order
              for i in range(ndim):
                  a = ()
                  if order in ("c", "C"):
                      for j in range(ndim - 1, i - 1, -1):
                          a = (j,) + a
                  elif order in ("f", "F"):
                      for j in range(0, i + 1):
                          a = a + (j,)
                  else:
                      raise ValueError(
                          "Please specify the array order."
                      )
                  try:
                      kw[name] = a
                      impl(self, *args, **kw)
                  except Exception:
                      print(
                          name,
                          "is",
                          a,
                          ", ndim is",
                          ndim,
                          ", shape is",
                          self.shape,
                          ", order is",
                          order,
                      )
                      raise
  
          return test_func
  
      return decorator
  
imports: import functools
  import inspect
  import os
  import random
  from typing import Tuple, Type
  import traceback
  import unittest
  import warnings
  import numpy
  import cupy
  from cupy.testing import _array
  from cupy.testing import _parameterized
  import cupyx
  import cupyx.scipy.sparse
  from cupy.testing._pytest_impl import is_available
label_desc: Use image node_id 42 for calling a global function with example usage: for_contiguous_axes(name) and returns: decorator, test_func