prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Use cleaner solution for non-truncating division in python 2
  Prefer `from __future__ import division` to `1.*x/y`
  
  </issue>
  <code>
  [start of scripts/build_glossary_page.py]
  1 import json
  2 
  3 
  4 def build_glossary_tuples(source_json_path):
  5     # Open the source_json_path
  6     with open(source_json_path) as json_file:
  7         # Read the contents as a json
  8         data = json.load(json_file)
  9         # Convert to list of tuples containing ("term", "definition", "url")
  10         data_list = [(x['term'], x['definition']) for x in data.values()]
  11         # Order list alphabetically by "term"
  12         data_list.sort(key=lambda y: y[0])
  13         # return the ordered list.
  14         return data_list
  15 
  16 
  17 def build_glossary_page(orderd_list_of_terms_tuples, glossary_file_path):
  18     # Open the glossary page for editing
  19     with open(glossary_file_path, "w") as glossary_file:
  20         # Write the glossary page header
  21         glossary_file.write("---\nid: glossary\ntitle: \"Glossary of Terms\"\n---\n")
  22         # iterate the glossary list of tuples and write glossary entries.
  23         for term, definition in orderd_list_of_terms_tuples:
  24             glossary_file.write(f"**{term}:** {definition}\n\n")
  25 
  26 
  27 def all_together_now(source_json_path, glossary_file_path):
  28     list_of_terms_tuples = build_glossary_tuples(source_json_path)
  29     build_glossary_page(list_of_terms_tuples, glossary_file_path)
  30 
  31 
  32 if __name__ == '__main__':
  33     all_together_now(
  34         source_json_path="../docs/term_tags/terms.json",
  35         glossary_file_path="../docs/glossary.md"
  36     )
  37
  [end of scripts/build_glossary_page.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/scripts/build_glossary_page.py b/scripts/build_glossary_page.py
  --- a/scripts/build_glossary_page.py
  +++ b/scripts/build_glossary_page.py
  @@ -18,7 +18,7 @@
       # Open the glossary page for editing
       with open(glossary_file_path, "w") as glossary_file:
           # Write the glossary page header
  -        glossary_file.write("---\nid: glossary\ntitle: \"Glossary of Terms\"\n---\n")
  +        glossary_file.write("---\nid: glossary\ntitle: \"Glossary of Terms\"\n---\n\n")
           # iterate the glossary list of tuples and write glossary entries.
           for term, definition in orderd_list_of_terms_tuples:
               glossary_file.write(f"**{term}:** {definition}\n\n")
  
verification_info: {"golden_diff": "diff --git a/scripts/build_glossary_page.py b/scripts/build_glossary_page.py\n--- a/scripts/build_glossary_page.py\n+++ b/scripts/build_glossary_page.py\n@@ -18,7 +18,7 @@\n     # Open the glossary page for editing\n     with open(glossary_file_path, \"w\") as glossary_file:\n         # Write the glossary page header\n-        glossary_file.write(\"---\\nid: glossary\\ntitle: \\\"Glossary of Terms\\\"\\n---\\n\")\n+        glossary_file.write(\"---\\nid: glossary\\ntitle: \\\"Glossary of Terms\\\"\\n---\\n\\n\")\n         # iterate the glossary list of tuples and write glossary entries.\n         for term, definition in orderd_list_of_terms_tuples:\n             glossary_file.write(f\"**{term}:** {definition}\\n\\n\")\n", "issue": "Use cleaner solution for non-truncating division in python 2\nPrefer `from __future__ import division` to `1.*x/y`\n", "before_files": [{"content": "import json\n\n\ndef build_glossary_tuples(source_json_path):\n    # Open the source_json_path\n    with open(source_json_path) as json_file:\n        # Read the contents as a json\n        data = json.load(json_file)\n        # Convert to list of tuples containing (\"term\", \"definition\", \"url\")\n        data_list = [(x['term'], x['definition']) for x in data.values()]\n        # Order list alphabetically by \"term\"\n        data_list.sort(key=lambda y: y[0])\n        # return the ordered list.\n        return data_list\n\n\ndef build_glossary_page(orderd_list_of_terms_tuples, glossary_file_path):\n    # Open the glossary page for editing\n    with open(glossary_file_path, \"w\") as glossary_file:\n        # Write the glossary page header\n        glossary_file.write(\"---\\nid: glossary\\ntitle: \\\"Glossary of Terms\\\"\\n---\\n\")\n        # iterate the glossary list of tuples and write glossary entries.\n        for term, definition in orderd_list_of_terms_tuples:\n            glossary_file.write(f\"**{term}:** {definition}\\n\\n\")\n\n\ndef all_together_now(source_json_path, glossary_file_path):\n    list_of_terms_tuples = build_glossary_tuples(source_json_path)\n    build_glossary_page(list_of_terms_tuples, glossary_file_path)\n\n\nif __name__ == '__main__':\n    all_together_now(\n        source_json_path=\"../docs/term_tags/terms.json\",\n        glossary_file_path=\"../docs/glossary.md\"\n    )\n", "path": "scripts/build_glossary_page.py"}]}