code: def tiered_ranges(
      numtype,
      intsize,
      signed,
      start,
      end,
      shift_step,
      startexcl,
      endexcl,
  ):
      assert numtype in (int, float)
      assert intsize in (8, 16, 32, 64)
  
      # Convert start and end values to sortable ints
      if start is None:
          start = 0
      else:
          start = to_sortable(numtype, intsize, signed, start)
          if startexcl:
              start += 1
  
      if end is None:
          end = 2**intsize - 1
      else:
          end = to_sortable(numtype, intsize, signed, end)
          if endexcl:
              end -= 1
  
      if not shift_step:
          return ((start, end, 0),)
  
      # Yield (rstart, rend, shift) ranges for the different resolutions
      return split_ranges(intsize, shift_step, start, end)
  
imports: import math, struct
  from array import array
  from bisect import bisect_left
  from struct import pack, unpack
  from whoosh.compat import b, long_type
  from whoosh.system import pack_byte, unpack_byte, pack_ushort, unpack_ushort
  from whoosh.system import pack_int, unpack_int, pack_uint, unpack_uint
  from whoosh.system import pack_long, unpack_long, pack_ulong, unpack_ulong
  from whoosh.system import pack_float, unpack_float, pack_double, unpack_double
label_desc: Use image node_id 10 for calling a global function with example usage: tiered_ranges(numtype, intsize, signed, start, end, shift_step, startexcl, endexcl) and returns: split_ranges, start,  end,  int