code: def get_valid_ranges(valid_ratios):
      """
      get_valid_box_ratios_range
      :param valid_ratios:
      :return:
      """
      valid_ranges = []
      if len(valid_ratios) == 1:
          valid_ranges.append([-1, -1])
      else:
          for i, vratio in enumerate(valid_ratios):
              if i == 0:
                  valid_ranges.append([-1, vratio[1]])
              elif i == len(valid_ratios) - 1:
                  valid_ranges.append([vratio[0], -1])
              else:
                  valid_ranges.append(vratio)
      return valid_ranges
  
file_path: PaddleDetection/tools/sniper_params_stats.py
imports: import sys
  import json
  import logging
  import numpy
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 4 for calling a global function with example usage: get_valid_ranges(valid_ratios) and returns: valid_ranges