code: def bininfo(num, size=1):
      if num == 0:
          return struct.pack(">4H", 0, 0, 0, 0)
      srange = 1
      select = 0
      while srange <= num:
          srange *= 2
          select += 1
      select -= 1
      srange //= 2
      srange *= size
      shift = num * size - srange
      return struct.pack(">4H", num, srange, select, shift)
  
file_path: catboost/contrib/python/fonttools/fontTools/ttLib/tables/grUtils.py
imports: import struct, warnings
label_desc: Use image node_id 5 for calling a global function with example usage: bininfo(num, size) and returns: struct, struct