class_docstr: Custom error type for dimension checking.
  
  This error is used in recursive calls in check_niimg to keep track of the
  dimensionality of the data. Its final goal it to generate a user friendly
  message.
  
  Parameters
  ----------
  file_dimension : integer
      Indicates the dimensionality of the bottom-level nifti file.
  
  required_dimension : integer
      The dimension the nifti file should have.
class_docstr_tok: ["Custom","error","type","for","dimension","checking",".","This","error","is","used","in","recursive","calls","in","check_niimg","to","keep","track","of","the","dimensionality","of","the","data",".","Its","final","goal","it","to","generate","a","user","friendly","message",".","Parameters","--","--","--","--","--","file_dimension",":","integer","Indicates","the","dimensionality","of","the","bottom-level","nifti","file",".","required_dimension",":","integer","The","dimension","the","nifti","file","should","have","."]
docstr: Increments the counter of recursive calls.
  
  Called when the error is caught and re-raised to count the
  number of recursive calls, ie the number of dimensions added by
  imbrication in lists.
docstr_tok: ["Increments","the","counter","of","recursive","calls",".","Called","when","the","error","is","caught","and","re-raised","to","count","the","number","of","recursive","calls",",","ie","the","number","of","dimensions","added","by","imbrication","in","lists","."]
code: def increment_stack_counter(self):
      """Increments the counter of recursive calls.
  
      Called when the error is caught and re-raised to count the
      number of recursive calls, ie the number of dimensions added by
      imbrication in lists.
  
      """
      self.stack_counter += 1
  
label_desc: Use image node_id 2 for calling the DimensionError obj's underlying member method code with example usage: obj.increment_stack_counter() without return types