code: def get_dims_with_exclusion(dim, exclude=None):
      dims = list(range(dim))
      if exclude is not None:
          dims.remove(exclude)
  
      return dims
  
file_path: PaddleSeg/EISeg/eiseg/util/misc.py
imports: import paddle
  import numpy
  import pickle
label_desc: Use image node_id 1 for calling a global function with example usage: get_dims_with_exclusion(dim, exclude) and returns: dims