code: def windowlize(scan, ww, wc):
      wl = wc - ww / 2
      wh = wc + ww / 2
      res = scan.copy()
      res = res.astype(np.float32)
      res = np.clip(res, wl, wh)
      res = (res - wl) / ww * 255
      res = res.astype(np.uint8)
      # print("++", res.shape)
      # for idx in range(res.shape[-1]):
      # TODO: 支持3d或者改调用
      res = cv2.cvtColor(res, cv2.COLOR_GRAY2BGR)
  
      return res
  
imports: import numpy
  import cv2
  from eiseg import logger
label_desc: Use image node_id 3 for calling a global function with example usage: windowlize(scan, ww, wc) and returns: res