code: def adjust_range_for_hexagon(in_min, in_max):
      out_max = max(0.0, in_max)
      out_min = min(0.0, in_min)
      scale = (out_max - out_min) / 255.0
      eps = 1e-6
      if out_min < -eps and out_max > eps:
          zero = -out_min / scale
          zero_int = int(round(zero))
          # if zero_int <=0 or >= 255, try to avoid divide by 0,
          # else, try to make adjustment as small as possible
          ceil = int(math.ceil(zero))
          keep_max = (ceil - zero) / out_max < (
              zero + 1 - ceil
          ) / -out_min
          if zero_int <= 0 or (zero_int < 254 and keep_max):
              zero_int = ceil
              scale = out_max / (255.0 - zero_int)
          else:
              scale = -out_min / zero_int
      elif out_min > -eps:
          zero_int = 0
      else:
          zero_int = 255
  
      return (
          scale,
          zero_int,
          -zero_int * scale,
          (255 - zero_int) * scale,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import math
  from transform.base_converter import DeviceType
label_desc: Use image node_id 4 for calling a global function with example usage: adjust_range_for_hexagon(in_min, in_max) and returns: scale,  zero_int,  unknown,  unknown