code: def _is_axis_allowed(self, axis):
          
          if axis is None:
              # If table direction was requested, we must ensure that each slice
              # doesn't have the CA items dimension (thus the [-2:] part). It's
              # OK for the 0th dimension to be items, since no calculation is
              # performed over it.
              if DT.CA_SUBVAR in self.dim_types[-2:]:
                  return False
              return True
  
          if isinstance(axis, int):
              if self.ndim == 1 and axis == 1:
                  # Special allowed case of a 1D cube, where "row"
                  # directions is requested.
                  return True
              axis = [axis]
  
          # ---axis is a tuple---
          for dim_idx in axis:
              if self.dim_types[dim_idx] == DT.CA_SUBVAR:
                  # If any of the directions explicitly asked for directly
                  # corresponds to the CA items dimension, the requested
                  # calculation is not valid.
                  return False
  
          return True
docs: Check if axis are allowed.
  
          In case the calculation is requested over CA items dimension, it is not
          valid. It's valid in all other cases.