code: def _nd_plan_is_possible(axes_sorted, ndim):
      # PlanNd supports 1D, 2D and 3D batch transforms over contiguous axes
      # Axes must be contiguous and the first or last axis must be in the axes.
      return (
          0 < len(axes_sorted) <= 3
          and (0 in axes_sorted or (ndim - 1) in axes_sorted)
          and all(
              (axes_sorted[n + 1] - axes_sorted[n]) == 1
              for n in range(len(axes_sorted) - 1)
          )
      )
  
imports: import functools
  import math
  import numpy
  import cupy
  from cupy.fft import config
  from cupy.fft._cache import get_plan_cache
label_desc: Use image node_id 9 for calling a global function with example usage: _nd_plan_is_possible(axes_sorted, ndim) and returns: unknown