prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Update pydoc for Messages (/var/log/messages)
  Correct the examples: https://github.com/RedHatInsights/insights-core/blob/master/insights/parsers/messages.py#L32
  
  </issue>
  <code>
  [start of insights/parsers/messages.py]
  1 """
  2 Messages file ``/var/log/messages``
  3 ===================================
  4 """
  5 
  6 from .. import Syslog, parser
  7 from insights.specs import Specs
  8 
  9 
  10 @parser(Specs.messages)
  11 class Messages(Syslog):
  12     """
  13     Read the ``/var/log/messages`` file.
  14 
  15     .. note::
  16         Please refer to its super-class :class:`insights.core.Syslog` for more
  17         details.
  18 
  19     Sample log lines::
  20 
  21         May 18 15:13:34 lxc-rhel68-sat56 jabberd/sm[11057]: session started: jid=rhn-dispatcher-sat@lxc-rhel6-sat56.redhat.com/superclient
  22         May 18 15:13:36 lxc-rhel68-sat56 wrapper[11375]: --> Wrapper Started as Daemon
  23         May 18 15:13:36 lxc-rhel68-sat56 wrapper[11375]: Launching a JVM...
  24         May 18 15:24:28 lxc-rhel68-sat56 yum[11597]: Installed: lynx-2.8.6-27.el6.x86_64
  25         May 18 15:36:19 lxc-rhel68-sat56 yum[11954]: Updated: sos-3.2-40.el6.noarch
  26 
  27     .. note::
  28         Because /var/log/messages timestamps by default have no year,
  29         the year of the logs will be inferred from the year in your timestamp.
  30         This will also work around December/January crossovers.
  31 
  32     Examples:
  33         >>> Messages.filters.append('wrapper')
  34         >>> Messages.token_scan('daemon_start', 'Wrapper Started as Daemon')
  35         >>> msgs = shared[Messages]
  36         >>> len(msgs.lines)
  37         >>> wrapper_msgs = msgs.get('wrapper') # Can only rely on lines filtered being present
  38         >>> wrapper_msgs[0]
  39         {'timestamp': 'May 18 15:13:36', 'hostname': 'lxc-rhel68-sat56',
  40          'procname': wrapper[11375]', 'message': '--> Wrapper Started as Daemon',
  41          'raw_message': 'May 18 15:13:36 lxc-rhel68-sat56 wrapper[11375]: --> Wrapper Started as Daemon'
  42         }
  43         >>> msgs.daemon_start # Token set if matching lines present in logs
  44         True
  45     """
  46     pass
  47
  [end of insights/parsers/messages.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/insights/parsers/messages.py b/insights/parsers/messages.py
  --- a/insights/parsers/messages.py
  +++ b/insights/parsers/messages.py
  @@ -30,17 +30,14 @@
           This will also work around December/January crossovers.
   
       Examples:
  -        >>> Messages.filters.append('wrapper')
           >>> Messages.token_scan('daemon_start', 'Wrapper Started as Daemon')
  -        >>> msgs = shared[Messages]
  +        >>> type(msgs)
  +        <class 'insights.parsers.messages.Messages'>
           >>> len(msgs.lines)
  +        9
           >>> wrapper_msgs = msgs.get('wrapper') # Can only rely on lines filtered being present
  -        >>> wrapper_msgs[0]
  -        {'timestamp': 'May 18 15:13:36', 'hostname': 'lxc-rhel68-sat56',
  -         'procname': wrapper[11375]', 'message': '--> Wrapper Started as Daemon',
  -         'raw_message': 'May 18 15:13:36 lxc-rhel68-sat56 wrapper[11375]: --> Wrapper Started as Daemon'
  -        }
  -        >>> msgs.daemon_start # Token set if matching lines present in logs
  +        >>> result = {'raw_message': 'May 18 15:13:36 lxc-rhel68-sat56 wrapper[11375]: --> Wrapper Started as Daemon', 'message': '--> Wrapper Started as Daemon', 'timestamp': 'May 18 15:13:36', 'hostname': 'lxc-rhel68-sat56', 'procname': 'wrapper[11375]'}
  +        >>> wrapper_msgs[0] == result
           True
       """
       pass
  
verification_info: {"golden_diff": "diff --git a/insights/parsers/messages.py b/insights/parsers/messages.py\n--- a/insights/parsers/messages.py\n+++ b/insights/parsers/messages.py\n@@ -30,17 +30,14 @@\n         This will also work around December/January crossovers.\n \n     Examples:\n-        >>> Messages.filters.append('wrapper')\n         >>> Messages.token_scan('daemon_start', 'Wrapper Started as Daemon')\n-        >>> msgs = shared[Messages]\n+        >>> type(msgs)\n+        <class 'insights.parsers.messages.Messages'>\n         >>> len(msgs.lines)\n+        9\n         >>> wrapper_msgs = msgs.get('wrapper') # Can only rely on lines filtered being present\n-        >>> wrapper_msgs[0]\n-        {'timestamp': 'May 18 15:13:36', 'hostname': 'lxc-rhel68-sat56',\n-         'procname': wrapper[11375]', 'message': '--> Wrapper Started as Daemon',\n-         'raw_message': 'May 18 15:13:36 lxc-rhel68-sat56 wrapper[11375]: --> Wrapper Started as Daemon'\n-        }\n-        >>> msgs.daemon_start # Token set if matching lines present in logs\n+        >>> result = {'raw_message': 'May 18 15:13:36 lxc-rhel68-sat56 wrapper[11375]: --> Wrapper Started as Daemon', 'message': '--> Wrapper Started as Daemon', 'timestamp': 'May 18 15:13:36', 'hostname': 'lxc-rhel68-sat56', 'procname': 'wrapper[11375]'}\n+        >>> wrapper_msgs[0] == result\n         True\n     \"\"\"\n     pass\n", "issue": "Update pydoc for Messages (/var/log/messages)\nCorrect the examples: https://github.com/RedHatInsights/insights-core/blob/master/insights/parsers/messages.py#L32\n", "before_files": [{"content": "\"\"\"\nMessages file ``/var/log/messages``\n===================================\n\"\"\"\n\nfrom .. import Syslog, parser\nfrom insights.specs import Specs\n\n\n@parser(Specs.messages)\nclass Messages(Syslog):\n    \"\"\"\n    Read the ``/var/log/messages`` file.\n\n    .. note::\n        Please refer to its super-class :class:`insights.core.Syslog` for more\n        details.\n\n    Sample log lines::\n\n        May 18 15:13:34 lxc-rhel68-sat56 jabberd/sm[11057]: session started: jid=rhn-dispatcher-sat@lxc-rhel6-sat56.redhat.com/superclient\n        May 18 15:13:36 lxc-rhel68-sat56 wrapper[11375]: --> Wrapper Started as Daemon\n        May 18 15:13:36 lxc-rhel68-sat56 wrapper[11375]: Launching a JVM...\n        May 18 15:24:28 lxc-rhel68-sat56 yum[11597]: Installed: lynx-2.8.6-27.el6.x86_64\n        May 18 15:36:19 lxc-rhel68-sat56 yum[11954]: Updated: sos-3.2-40.el6.noarch\n\n    .. note::\n        Because /var/log/messages timestamps by default have no year,\n        the year of the logs will be inferred from the year in your timestamp.\n        This will also work around December/January crossovers.\n\n    Examples:\n        >>> Messages.filters.append('wrapper')\n        >>> Messages.token_scan('daemon_start', 'Wrapper Started as Daemon')\n        >>> msgs = shared[Messages]\n        >>> len(msgs.lines)\n        >>> wrapper_msgs = msgs.get('wrapper') # Can only rely on lines filtered being present\n        >>> wrapper_msgs[0]\n        {'timestamp': 'May 18 15:13:36', 'hostname': 'lxc-rhel68-sat56',\n         'procname': wrapper[11375]', 'message': '--> Wrapper Started as Daemon',\n         'raw_message': 'May 18 15:13:36 lxc-rhel68-sat56 wrapper[11375]: --> Wrapper Started as Daemon'\n        }\n        >>> msgs.daemon_start # Token set if matching lines present in logs\n        True\n    \"\"\"\n    pass\n", "path": "insights/parsers/messages.py"}]}