code: def get_bbox_from_mask(mask):
      rows = np.any(mask, axis=1)
      cols = np.any(mask, axis=0)
      rmin, rmax = np.where(rows)[0][[0, -1]]
      cmin, cmax = np.where(cols)[0][[0, -1]]
  
      return rmin, rmax, cmin, cmax
  
file_path: PaddleSeg/EISeg/eiseg/util/misc.py
imports: import paddle
  import numpy
  import pickle
label_desc: Use image node_id 3 for calling a global function with example usage: get_bbox_from_mask(mask) and returns: rmin,  rmax,  cmin,  cmax