prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Use cleaner solution for non-truncating division in python 2
  Prefer `from __future__ import division` to `1.*x/y`
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `scripts/build_glossary_page.py`
  Content:
  ```
  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 FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
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"}], "after_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\")\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"}]}