prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  sorts/random_normal_distribution_quicksort.py has no tests
  ### Repository commit
  
  3
  
  ### Python version (python --version)
  
  Python 3.11.5
  
  ### Dependencies version (pip freeze)
  
  Numpy
  
  ### Expected behavior
  
  Tests.
  
  ### Actual behavior
  
  No tests.
  
  </issue>
  <code>
  [start of sorts/random_normal_distribution_quicksort.py]
  1 from random import randint
  2 from tempfile import TemporaryFile
  3 
  4 import numpy as np
  5 
  6 
  7 def _in_place_quick_sort(a, start, end):
  8     count = 0
  9     if start < end:
  10         pivot = randint(start, end)
  11         temp = a[end]
  12         a[end] = a[pivot]
  13         a[pivot] = temp
  14 
  15         p, count = _in_place_partition(a, start, end)
  16         count += _in_place_quick_sort(a, start, p - 1)
  17         count += _in_place_quick_sort(a, p + 1, end)
  18     return count
  19 
  20 
  21 def _in_place_partition(a, start, end):
  22     count = 0
  23     pivot = randint(start, end)
  24     temp = a[end]
  25     a[end] = a[pivot]
  26     a[pivot] = temp
  27     new_pivot_index = start - 1
  28     for index in range(start, end):
  29         count += 1
  30         if a[index] < a[end]:  # check if current val is less than pivot value
  31             new_pivot_index = new_pivot_index + 1
  32             temp = a[new_pivot_index]
  33             a[new_pivot_index] = a[index]
  34             a[index] = temp
  35 
  36     temp = a[new_pivot_index + 1]
  37     a[new_pivot_index + 1] = a[end]
  38     a[end] = temp
  39     return new_pivot_index + 1, count
  40 
  41 
  42 outfile = TemporaryFile()
  43 p = 100  # 1000 elements are to be sorted
  44 
  45 
  46 mu, sigma = 0, 1  # mean and standard deviation
  47 X = np.random.normal(mu, sigma, p)
  48 np.save(outfile, X)
  49 print("The array is")
  50 print(X)
  51 
  52 
  53 outfile.seek(0)  # using the same array
  54 M = np.load(outfile)
  55 r = len(M) - 1
  56 z = _in_place_quick_sort(M, 0, r)
  57 
  58 print(
  59     "No of Comparisons for 100 elements selected from a standard normal distribution"
  60     "is :"
  61 )
  62 print(z)
  63
  [end of sorts/random_normal_distribution_quicksort.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/sorts/random_normal_distribution_quicksort.py b/sorts/random_normal_distribution_quicksort.py
  deleted file mode 100644
  --- a/sorts/random_normal_distribution_quicksort.py
  +++ /dev/null
  @@ -1,62 +0,0 @@
  -from random import randint
  -from tempfile import TemporaryFile
  -
  -import numpy as np
  -
  -
  -def _in_place_quick_sort(a, start, end):
  -    count = 0
  -    if start < end:
  -        pivot = randint(start, end)
  -        temp = a[end]
  -        a[end] = a[pivot]
  -        a[pivot] = temp
  -
  -        p, count = _in_place_partition(a, start, end)
  -        count += _in_place_quick_sort(a, start, p - 1)
  -        count += _in_place_quick_sort(a, p + 1, end)
  -    return count
  -
  -
  -def _in_place_partition(a, start, end):
  -    count = 0
  -    pivot = randint(start, end)
  -    temp = a[end]
  -    a[end] = a[pivot]
  -    a[pivot] = temp
  -    new_pivot_index = start - 1
  -    for index in range(start, end):
  -        count += 1
  -        if a[index] < a[end]:  # check if current val is less than pivot value
  -            new_pivot_index = new_pivot_index + 1
  -            temp = a[new_pivot_index]
  -            a[new_pivot_index] = a[index]
  -            a[index] = temp
  -
  -    temp = a[new_pivot_index + 1]
  -    a[new_pivot_index + 1] = a[end]
  -    a[end] = temp
  -    return new_pivot_index + 1, count
  -
  -
  -outfile = TemporaryFile()
  -p = 100  # 1000 elements are to be sorted
  -
  -
  -mu, sigma = 0, 1  # mean and standard deviation
  -X = np.random.normal(mu, sigma, p)
  -np.save(outfile, X)
  -print("The array is")
  -print(X)
  -
  -
  -outfile.seek(0)  # using the same array
  -M = np.load(outfile)
  -r = len(M) - 1
  -z = _in_place_quick_sort(M, 0, r)
  -
  -print(
  -    "No of Comparisons for 100 elements selected from a standard normal distribution"
  -    "is :"
  -)
  -print(z)
  
verification_info: {"golden_diff": "diff --git a/sorts/random_normal_distribution_quicksort.py b/sorts/random_normal_distribution_quicksort.py\ndeleted file mode 100644\n--- a/sorts/random_normal_distribution_quicksort.py\n+++ /dev/null\n@@ -1,62 +0,0 @@\n-from random import randint\n-from tempfile import TemporaryFile\n-\n-import numpy as np\n-\n-\n-def _in_place_quick_sort(a, start, end):\n-    count = 0\n-    if start < end:\n-        pivot = randint(start, end)\n-        temp = a[end]\n-        a[end] = a[pivot]\n-        a[pivot] = temp\n-\n-        p, count = _in_place_partition(a, start, end)\n-        count += _in_place_quick_sort(a, start, p - 1)\n-        count += _in_place_quick_sort(a, p + 1, end)\n-    return count\n-\n-\n-def _in_place_partition(a, start, end):\n-    count = 0\n-    pivot = randint(start, end)\n-    temp = a[end]\n-    a[end] = a[pivot]\n-    a[pivot] = temp\n-    new_pivot_index = start - 1\n-    for index in range(start, end):\n-        count += 1\n-        if a[index] < a[end]:  # check if current val is less than pivot value\n-            new_pivot_index = new_pivot_index + 1\n-            temp = a[new_pivot_index]\n-            a[new_pivot_index] = a[index]\n-            a[index] = temp\n-\n-    temp = a[new_pivot_index + 1]\n-    a[new_pivot_index + 1] = a[end]\n-    a[end] = temp\n-    return new_pivot_index + 1, count\n-\n-\n-outfile = TemporaryFile()\n-p = 100  # 1000 elements are to be sorted\n-\n-\n-mu, sigma = 0, 1  # mean and standard deviation\n-X = np.random.normal(mu, sigma, p)\n-np.save(outfile, X)\n-print(\"The array is\")\n-print(X)\n-\n-\n-outfile.seek(0)  # using the same array\n-M = np.load(outfile)\n-r = len(M) - 1\n-z = _in_place_quick_sort(M, 0, r)\n-\n-print(\n-    \"No of Comparisons for 100 elements selected from a standard normal distribution\"\n-    \"is :\"\n-)\n-print(z)\n", "issue": "sorts/random_normal_distribution_quicksort.py has no tests\n### Repository commit\n\n3\n\n### Python version (python --version)\n\nPython 3.11.5\n\n### Dependencies version (pip freeze)\n\nNumpy\n\n### Expected behavior\n\nTests.\n\n### Actual behavior\n\nNo tests.\n", "before_files": [{"content": "from random import randint\nfrom tempfile import TemporaryFile\n\nimport numpy as np\n\n\ndef _in_place_quick_sort(a, start, end):\n    count = 0\n    if start < end:\n        pivot = randint(start, end)\n        temp = a[end]\n        a[end] = a[pivot]\n        a[pivot] = temp\n\n        p, count = _in_place_partition(a, start, end)\n        count += _in_place_quick_sort(a, start, p - 1)\n        count += _in_place_quick_sort(a, p + 1, end)\n    return count\n\n\ndef _in_place_partition(a, start, end):\n    count = 0\n    pivot = randint(start, end)\n    temp = a[end]\n    a[end] = a[pivot]\n    a[pivot] = temp\n    new_pivot_index = start - 1\n    for index in range(start, end):\n        count += 1\n        if a[index] < a[end]:  # check if current val is less than pivot value\n            new_pivot_index = new_pivot_index + 1\n            temp = a[new_pivot_index]\n            a[new_pivot_index] = a[index]\n            a[index] = temp\n\n    temp = a[new_pivot_index + 1]\n    a[new_pivot_index + 1] = a[end]\n    a[end] = temp\n    return new_pivot_index + 1, count\n\n\noutfile = TemporaryFile()\np = 100  # 1000 elements are to be sorted\n\n\nmu, sigma = 0, 1  # mean and standard deviation\nX = np.random.normal(mu, sigma, p)\nnp.save(outfile, X)\nprint(\"The array is\")\nprint(X)\n\n\noutfile.seek(0)  # using the same array\nM = np.load(outfile)\nr = len(M) - 1\nz = _in_place_quick_sort(M, 0, r)\n\nprint(\n    \"No of Comparisons for 100 elements selected from a standard normal distribution\"\n    \"is :\"\n)\nprint(z)\n", "path": "sorts/random_normal_distribution_quicksort.py"}]}