prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  en_US SSN provider generates invalid SSNs
  There's a few limitations on United States' SSNs that prevent it from being completely random.
  - No group can be all 0s
  - The SSN cannot start with 666
  - The SSN cannot start with a number >= 900
  
  See http://www.ssa.gov/employer/randomization.html
  
  Could you modify the SSN generator to avoid these issues?
  
  
  </issue>
  <code>
  [start of faker/providers/ssn/en_US/__init__.py]
  1 # coding=utf-8
  2 from __future__ import unicode_literals
  3 from .. import Provider as BaseProvider
  4 
  5 
  6 class Provider(BaseProvider):
  7     pass
  8
  [end of faker/providers/ssn/en_US/__init__.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/faker/providers/ssn/en_US/__init__.py b/faker/providers/ssn/en_US/__init__.py
  --- a/faker/providers/ssn/en_US/__init__.py
  +++ b/faker/providers/ssn/en_US/__init__.py
  @@ -4,4 +4,17 @@
   
   
   class Provider(BaseProvider):
  -    pass
  +
  +    @classmethod
  +    def ssn(cls):
  +        # Certain numbers are invalid for U.S. SSNs. The area (first 3 digits)
  +        # cannot be 666 or 900-999. The group number (middle digits) cannot be
  +        # 00. The serial (last 4 digits) cannot be 0000
  +        area = BaseProvider.random_int(min=1, max=899)
  +        if area == 666:
  +            area += 1
  +        group = BaseProvider.random_int(1, 99)
  +        serial = BaseProvider.random_int(1, 9999)
  +
  +        ssn = "{0:03d}-{1:02d}-{2:04d}".format(area, group, serial)
  +        return ssn
  
verification_info: {"golden_diff": "diff --git a/faker/providers/ssn/en_US/__init__.py b/faker/providers/ssn/en_US/__init__.py\n--- a/faker/providers/ssn/en_US/__init__.py\n+++ b/faker/providers/ssn/en_US/__init__.py\n@@ -4,4 +4,17 @@\n \n \n class Provider(BaseProvider):\n-    pass\n+\n+    @classmethod\n+    def ssn(cls):\n+        # Certain numbers are invalid for U.S. SSNs. The area (first 3 digits)\n+        # cannot be 666 or 900-999. The group number (middle digits) cannot be\n+        # 00. The serial (last 4 digits) cannot be 0000\n+        area = BaseProvider.random_int(min=1, max=899)\n+        if area == 666:\n+            area += 1\n+        group = BaseProvider.random_int(1, 99)\n+        serial = BaseProvider.random_int(1, 9999)\n+\n+        ssn = \"{0:03d}-{1:02d}-{2:04d}\".format(area, group, serial)\n+        return ssn\n", "issue": "en_US SSN provider generates invalid SSNs\nThere's a few limitations on United States' SSNs that prevent it from being completely random.\n- No group can be all 0s\n- The SSN cannot start with 666\n- The SSN cannot start with a number >= 900\n\nSee http://www.ssa.gov/employer/randomization.html\n\nCould you modify the SSN generator to avoid these issues?\n\n", "before_files": [{"content": "# coding=utf-8\nfrom __future__ import unicode_literals\nfrom .. import Provider as BaseProvider\n\n\nclass Provider(BaseProvider):\n    pass\n", "path": "faker/providers/ssn/en_US/__init__.py"}]}