docs: def _identify_prefix(self, msg, data):
          '''
          Check the message again each OS prefix and if matched return the
          message dict
          '''
          prefix_id = -1
          for prefix in data:
              msg_dict = {}
              prefix_id += 1
              match = None
              if '__python_fun__' in prefix:
                  log.debug('Trying to match using the %s custom python profiler', prefix['__python_mod__'])
                  try:
                      match = prefix['__python_fun__'](msg)
                  except Exception:
                      log.error('Exception while parsing %s with the %s python profiler',
                                msg, prefix['__python_mod__'], exc_info=True)
              else:
                  log.debug('Matching using YAML-defined profiler:')
                  log.debug(prefix['raw_prefix'])
                  match = prefix['prefix'].search(msg)
              if not match:
                  log.debug('Match not found')
                  continue
              if '__python_fun__' in prefix:
                  log.debug('%s matched using the custom python profiler %s', msg, prefix['__python_mod__'])
                  msg_dict = match  # the output as-is from the custom function
              else:
                  positions = prefix.get('prefix_positions', {})
                  values = prefix.get('values')
                  msg_dict = {}
                  for key in values.keys():
                      msg_dict[key] = match.group(positions.get(key))
              # Remove whitespace from the start or end of the message
              msg_dict['__prefix_id__'] = prefix_id
              msg_dict['message'] = msg_dict['message'].strip()
  
              # The pri has to be an int as it is retrived using regex '\<(\d+)\>'
              if 'pri' in msg_dict:
                  msg_dict['facility'] = int(int(msg_dict['pri']) / 8)
                  msg_dict['severity'] = int(int(msg_dict['pri']) - (msg_dict['facility'] * 8))
              return msg_dict