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","."]
code: def __init__(self, file_dimension, required_dimension):
      self.file_dimension = file_dimension
      self.required_dimension = required_dimension
      self.stack_counter = 0
  
      super().__init__()
  
label_desc: Use image node_id 1 to create a new DimensionError object from inherited base classes: TypeError with example: obj = DimensionError(file_dimension, required_dimension)