docs: def _parse(self, msg_dict):
          '''
          Parse a syslog message and check what OpenConfig object should
          be generated.
          '''
          error_present = False
          # log.debug('Matching the message:')
          # log.debug(msg_dict)
          for message in self.compiled_messages:
              # log.debug('Matching using:')
              # log.debug(message)
              match_on = message['match_on']
              if match_on not in msg_dict:
                  # log.debug('%s is not a valid key in the partially parsed dict', match_on)
                  continue
              if message['tag'] != msg_dict[match_on]:
                  continue
              if '__python_fun__' in message:
                  return {
                      'model': message['model'],
                      'error': message['error'],
                      '__python_fun__': message['__python_fun__']
                  }
              error_present = True
              match = message['line'].search(msg_dict['message'])
              if not match:
                  continue
              positions = message.get('positions', {})
              values = message.get('values')
              ret = {
                  'model': message['model'],
                  'mapping': message['mapping'],
                  'replace': message['replace'],
                  'error': message['error']
              }
              for key in values.keys():
                  # Check if the value needs to be replaced
                  if key in message['replace']:
                      result = napalm_logs.utils.cast(match.group(positions.get(key)), message['replace'][key])
                  else:
                      result = match.group(positions.get(key))
                  ret[key] = result
              return ret
          if error_present is True:
              log.info('Configured regex did not match for os: %s tag %s', self._name, msg_dict.get('tag', ''))
          else:
              log.info('Syslog message not configured for os: %s tag %s', self._name, msg_dict.get('tag', ''))