prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Doc fixes
  Some minor doc fixes with a bit of style change
  
  
  </issue>
  <code>
  [start of src/ralph/dashboards/management/commands/push_graphs_to_statsd.py]
  1 # -*- coding: utf-8 -*-
  2 import logging
  3 import textwrap
  4 
  5 from django.conf import settings
  6 from django.core.management.base import BaseCommand
  7 from django.utils.text import slugify
  8 
  9 from ralph.dashboards.models import Graph
  10 from ralph.lib.metrics import build_statsd_client
  11 
  12 logger = logging.getLogger(__name__)
  13 PREFIX = settings.STATSD_GRAPHS_PREFIX
  14 STATSD_PATH = '{}.{{}}.{{}}'.format(PREFIX)
  15 
  16 
  17 def normalize(s):
  18     s = slugify(s)
  19     return s.replace('-', '_')
  20 
  21 
  22 class Command(BaseCommand):
  23     """Push to statsd data generated by graphs."""
  24     help = textwrap.dedent(__doc__).strip()
  25 
  26     def handle(self, *args, **kwargs):
  27         statsd = build_statsd_client(prefix=STATSD_PATH)
  28         graphs = Graph.objects.filter(push_to_statsd=True)
  29         for graph in graphs:
  30             graph_data = graph.get_data()
  31             graph_name = normalize(graph.name)
  32             for label, value in zip(graph_data['labels'], graph_data['series']):
  33                 path = STATSD_PATH.format(graph_name, normalize(label))
  34                 statsd.gauge(path, value)
  35
  [end of src/ralph/dashboards/management/commands/push_graphs_to_statsd.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/src/ralph/dashboards/management/commands/push_graphs_to_statsd.py b/src/ralph/dashboards/management/commands/push_graphs_to_statsd.py
  --- a/src/ralph/dashboards/management/commands/push_graphs_to_statsd.py
  +++ b/src/ralph/dashboards/management/commands/push_graphs_to_statsd.py
  @@ -10,8 +10,6 @@
   from ralph.lib.metrics import build_statsd_client
   
   logger = logging.getLogger(__name__)
  -PREFIX = settings.STATSD_GRAPHS_PREFIX
  -STATSD_PATH = '{}.{{}}.{{}}'.format(PREFIX)
   
   
   def normalize(s):
  @@ -24,11 +22,11 @@
       help = textwrap.dedent(__doc__).strip()
   
       def handle(self, *args, **kwargs):
  -        statsd = build_statsd_client(prefix=STATSD_PATH)
  +        statsd = build_statsd_client(prefix=settings.STATSD_GRAPHS_PREFIX)
           graphs = Graph.objects.filter(push_to_statsd=True)
           for graph in graphs:
               graph_data = graph.get_data()
               graph_name = normalize(graph.name)
               for label, value in zip(graph_data['labels'], graph_data['series']):
  -                path = STATSD_PATH.format(graph_name, normalize(label))
  +                path = '.'.join((graph_name, normalize(label)))
                   statsd.gauge(path, value)
  
verification_info: {"golden_diff": "diff --git a/src/ralph/dashboards/management/commands/push_graphs_to_statsd.py b/src/ralph/dashboards/management/commands/push_graphs_to_statsd.py\n--- a/src/ralph/dashboards/management/commands/push_graphs_to_statsd.py\n+++ b/src/ralph/dashboards/management/commands/push_graphs_to_statsd.py\n@@ -10,8 +10,6 @@\n from ralph.lib.metrics import build_statsd_client\n \n logger = logging.getLogger(__name__)\n-PREFIX = settings.STATSD_GRAPHS_PREFIX\n-STATSD_PATH = '{}.{{}}.{{}}'.format(PREFIX)\n \n \n def normalize(s):\n@@ -24,11 +22,11 @@\n     help = textwrap.dedent(__doc__).strip()\n \n     def handle(self, *args, **kwargs):\n-        statsd = build_statsd_client(prefix=STATSD_PATH)\n+        statsd = build_statsd_client(prefix=settings.STATSD_GRAPHS_PREFIX)\n         graphs = Graph.objects.filter(push_to_statsd=True)\n         for graph in graphs:\n             graph_data = graph.get_data()\n             graph_name = normalize(graph.name)\n             for label, value in zip(graph_data['labels'], graph_data['series']):\n-                path = STATSD_PATH.format(graph_name, normalize(label))\n+                path = '.'.join((graph_name, normalize(label)))\n                 statsd.gauge(path, value)\n", "issue": "Doc fixes\nSome minor doc fixes with a bit of style change\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport logging\nimport textwrap\n\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand\nfrom django.utils.text import slugify\n\nfrom ralph.dashboards.models import Graph\nfrom ralph.lib.metrics import build_statsd_client\n\nlogger = logging.getLogger(__name__)\nPREFIX = settings.STATSD_GRAPHS_PREFIX\nSTATSD_PATH = '{}.{{}}.{{}}'.format(PREFIX)\n\n\ndef normalize(s):\n    s = slugify(s)\n    return s.replace('-', '_')\n\n\nclass Command(BaseCommand):\n    \"\"\"Push to statsd data generated by graphs.\"\"\"\n    help = textwrap.dedent(__doc__).strip()\n\n    def handle(self, *args, **kwargs):\n        statsd = build_statsd_client(prefix=STATSD_PATH)\n        graphs = Graph.objects.filter(push_to_statsd=True)\n        for graph in graphs:\n            graph_data = graph.get_data()\n            graph_name = normalize(graph.name)\n            for label, value in zip(graph_data['labels'], graph_data['series']):\n                path = STATSD_PATH.format(graph_name, normalize(label))\n                statsd.gauge(path, value)\n", "path": "src/ralph/dashboards/management/commands/push_graphs_to_statsd.py"}]}