code: def get_offsets(length, crop_size, min_overlap_ratio=0.2):
      if length == crop_size:
          return [0]
  
      N = (length / crop_size - min_overlap_ratio) / (
          1 - min_overlap_ratio
      )
      N = math.ceil(N)
  
      overlap_ratio = (N - length / crop_size) / (N - 1)
      overlap_width = int(crop_size * overlap_ratio)
  
      offsets = [0]
      for i in range(1, N):
          new_offset = offsets[-1] + crop_size - overlap_width
          if new_offset + crop_size > length:
              new_offset = length - crop_size
  
          offsets.append(new_offset)
  
      return offsets
  
file_path: PaddleSeg/EISeg/eiseg/inference/transforms/crops.py
imports: import math
  import paddle
  import numpy
  from inference.clicker import Click
  from .base import BaseTransform
label_desc: Use image node_id 1 for calling a global function with example usage: get_offsets(length, crop_size, min_overlap_ratio) and returns: offsets, list