docs: def calc_format_info(version, error, mask_pattern):
      """\
      Returns the format information for the provided error level and mask patttern.
  
      ISO/IEC 18004:2015(E) -- 7.9 Format information (page 55)
      ISO/IEC 18004:2015(E) -- Table C.1 — Valid format information bit sequences (page 80)
  
      :param int version: Version constant
      :param int error: Error level constant.
      :param int mask_pattern: Mask pattern number.
      """
      fmt = mask_pattern
      if version > 0:
          if error == consts.ERROR_LEVEL_L:
              fmt += 0x08
          elif error == consts.ERROR_LEVEL_H:
              fmt += 0x10
          elif error == consts.ERROR_LEVEL_Q:
              fmt += 0x18
          format_info = consts.FORMAT_INFO[fmt]
      else:
          fmt += consts.ERROR_LEVEL_TO_MICRO_MAPPING[version][error] << 2
          format_info = consts.FORMAT_INFO_MICRO[fmt]
      return format_info