code: def caa_rec(rdatas):
      '''
      Validate and parse DNS record data for a CAA record
      :param rdata: DNS record data
      :return: dict w/fields
      '''
      rschema = OrderedDict((
          ('flags', lambda flag: ['critical'] if int(flag) > 0 else []),
          ('tag', RFC.CAA_TAGS),
          ('value', lambda val: val.strip('\',"'))
      ))
  
      res = _data2rec_group(rschema, rdatas, 'tag')
  
      for tag in ('issue', 'issuewild'):
          tag_res = res.get(tag, False)
          if not tag_res:
              continue
          for idx, val in enumerate(tag_res):
              if ';' not in val:
                  continue
              val, params = val.split(';', 1)
              params = dict(param.split('=') for param in shlex.split(params))
              tag_res[idx] = {val: params}
  
      return ref caa_rec(rdatas):
      '''
      Validate and parse DNS record data for a CAA record
      :param rdata: DNS record data
      :return: dict w/fields
      '''
      rschema = OrderedDict((
          ('flags', lambda flag: ['critical'] if int(flag) > 0 else []),
          ('tag', RFC.CAA_TAGS),
          ('value', lambda val: val.strip('\',"'))
      ))
  
      res = _data2rec_group(rschema, rdatas, 'tag')
  
      for tag in ('issue', 'issuewild'):
          tag_res = res.get(tag, False)
          if not tag_res:
              continue
          for idx, val in enumerate(tag_res):
              if ';' not in val:
                  continue
              val, params = val.split(';', 1)
              params = dict(param.split('=') for param in shlex.split(params))
              tag_res[idx] = {val: params}
  
      return res
docs: Validate and parse DNS record data for a CAA record
      :param rdata: DNS record data
      :return: dict w/fields