prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  `.prefix`/`.suffix` returns a tuple instead of a single value
  `.prefix` (and `.suffix`) can occasionally return a tuple of values instead of a single value when `prefixes_male` and `prefixes_female` (or `suffixes_*`) are present in the provider.
  
  [See here for the code responsible.](https://github.com/joke2k/faker/blob/2af330e09d84306d10921fed00ad2e5cc8e3d36f/faker/providers/person/__init__.py#L93-L94)
  
  I wasn't sure if this was intentional (it's documented to do so -- then again, the documentation is autogenerated, isn't it?), so I didn't make a PR yet, but it's certainly counterintuitive.
  
  
  </issue>
  <code>
  [start of faker/providers/person/__init__.py]
  1 localized = True
  2 
  3 from .. import BaseProvider
  4 
  5 
  6 class Provider(BaseProvider):
  7     formats = ['{{first_name}} {{last_name}}', ]
  8 
  9     first_names = ['John', 'Jane']
  10 
  11     last_names = ['Doe', ]
  12 
  13     def name(self):
  14         """
  15         :example 'John Doe'
  16         """
  17         pattern = self.random_element(self.formats)
  18         return self.generator.parse(pattern)
  19 
  20     @classmethod
  21     def first_name(cls):
  22         return cls.random_element(cls.first_names)
  23 
  24     @classmethod
  25     def last_name(cls):
  26         return cls.random_element(cls.last_names)
  27 
  28     def name_male(self):
  29         if hasattr(self, 'formats_male'):
  30             formats = self.formats_male
  31         else:
  32             formats = self.formats
  33         pattern = self.random_element(formats)
  34         return self.generator.parse(pattern)
  35 
  36     def name_female(self):
  37         if hasattr(self, 'formats_female'):
  38             formats = self.formats_female
  39         else:
  40             formats = self.formats
  41         pattern = self.random_element(formats)
  42         return self.generator.parse(pattern)
  43 
  44     @classmethod
  45     def first_name_male(cls):
  46         if hasattr(cls, 'first_names_male'):
  47             return cls.random_element(cls.first_names_male)
  48         return cls.first_name()
  49 
  50     @classmethod
  51     def first_name_female(cls):
  52         if hasattr(cls, 'first_names_female'):
  53             return cls.random_element(cls.first_names_female)
  54         return cls.first_name()
  55 
  56     @classmethod
  57     def last_name_male(cls):
  58         if hasattr(cls, 'last_names_male'):
  59             return cls.random_element(cls.last_names_male)
  60         return cls.last_name()
  61 
  62     @classmethod
  63     def last_name_female(cls):
  64         if hasattr(cls, 'last_names_female'):
  65             return cls.random_element(cls.last_names_female)
  66         return cls.last_name()
  67 
  68 
  69     @classmethod
  70     def prefix(cls):
  71         if hasattr(cls, 'prefixes'):
  72             return cls.random_element(cls.prefixes)
  73         if hasattr(cls, 'prefixes_male') and hasattr(cls, 'prefixes_female'):
  74             return cls.random_element((cls.prefixes_male, cls.prefixes_female))
  75         return ''
  76 
  77     @classmethod
  78     def prefix_male(cls):
  79         if hasattr(cls, 'prefixes_male'):
  80             return cls.random_element(cls.prefixes_male)
  81         return cls.prefix()
  82 
  83     @classmethod
  84     def prefix_female(cls):
  85         if hasattr(cls, 'prefixes_female'):
  86             return cls.random_element(cls.prefixes_female)
  87         return cls.prefix()
  88 
  89     @classmethod
  90     def suffix(cls):
  91         if hasattr(cls, 'suffixes'):
  92             return cls.random_element(cls.suffixes)
  93         if hasattr(cls, 'suffixes_male') and hasattr(cls, 'suffixes_female'):
  94             return cls.random_element((cls.suffixes_male, cls.suffixes_female))
  95         return ''
  96 
  97     @classmethod
  98     def suffix_male(cls):
  99         if hasattr(cls, 'suffixes_male'):
  100             return cls.random_element(cls.suffixes_male)
  101         return cls.suffix()
  102 
  103     @classmethod
  104     def suffix_female(cls):
  105         if hasattr(cls, 'suffixes_female'):
  106             return cls.random_element(cls.suffixes_female)
  107         return cls.suffix()
  108
  [end of faker/providers/person/__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/person/__init__.py b/faker/providers/person/__init__.py
  --- a/faker/providers/person/__init__.py
  +++ b/faker/providers/person/__init__.py
  @@ -71,7 +71,8 @@
           if hasattr(cls, 'prefixes'):
               return cls.random_element(cls.prefixes)
           if hasattr(cls, 'prefixes_male') and hasattr(cls, 'prefixes_female'):
  -            return cls.random_element((cls.prefixes_male, cls.prefixes_female))
  +            prefixes = cls.random_element((cls.prefixes_male, cls.prefixes_female))
  +            return cls.random_element(prefixes)
           return ''
   
       @classmethod
  @@ -91,7 +92,8 @@
           if hasattr(cls, 'suffixes'):
               return cls.random_element(cls.suffixes)
           if hasattr(cls, 'suffixes_male') and hasattr(cls, 'suffixes_female'):
  -            return cls.random_element((cls.suffixes_male, cls.suffixes_female))
  +            suffixes = cls.random_element((cls.suffixes_male, cls.suffixes_female))
  +            return cls.random_element(suffixes)
           return ''
   
       @classmethod
  
verification_info: {"golden_diff": "diff --git a/faker/providers/person/__init__.py b/faker/providers/person/__init__.py\n--- a/faker/providers/person/__init__.py\n+++ b/faker/providers/person/__init__.py\n@@ -71,7 +71,8 @@\n         if hasattr(cls, 'prefixes'):\n             return cls.random_element(cls.prefixes)\n         if hasattr(cls, 'prefixes_male') and hasattr(cls, 'prefixes_female'):\n-            return cls.random_element((cls.prefixes_male, cls.prefixes_female))\n+            prefixes = cls.random_element((cls.prefixes_male, cls.prefixes_female))\n+            return cls.random_element(prefixes)\n         return ''\n \n     @classmethod\n@@ -91,7 +92,8 @@\n         if hasattr(cls, 'suffixes'):\n             return cls.random_element(cls.suffixes)\n         if hasattr(cls, 'suffixes_male') and hasattr(cls, 'suffixes_female'):\n-            return cls.random_element((cls.suffixes_male, cls.suffixes_female))\n+            suffixes = cls.random_element((cls.suffixes_male, cls.suffixes_female))\n+            return cls.random_element(suffixes)\n         return ''\n \n     @classmethod\n", "issue": "`.prefix`/`.suffix` returns a tuple instead of a single value\n`.prefix` (and `.suffix`) can occasionally return a tuple of values instead of a single value when `prefixes_male` and `prefixes_female` (or `suffixes_*`) are present in the provider.\n\n[See here for the code responsible.](https://github.com/joke2k/faker/blob/2af330e09d84306d10921fed00ad2e5cc8e3d36f/faker/providers/person/__init__.py#L93-L94)\n\nI wasn't sure if this was intentional (it's documented to do so -- then again, the documentation is autogenerated, isn't it?), so I didn't make a PR yet, but it's certainly counterintuitive.\n\n", "before_files": [{"content": "localized = True\n\nfrom .. import BaseProvider\n\n\nclass Provider(BaseProvider):\n    formats = ['{{first_name}} {{last_name}}', ]\n\n    first_names = ['John', 'Jane']\n\n    last_names = ['Doe', ]\n\n    def name(self):\n        \"\"\"\n        :example 'John Doe'\n        \"\"\"\n        pattern = self.random_element(self.formats)\n        return self.generator.parse(pattern)\n\n    @classmethod\n    def first_name(cls):\n        return cls.random_element(cls.first_names)\n\n    @classmethod\n    def last_name(cls):\n        return cls.random_element(cls.last_names)\n\n    def name_male(self):\n        if hasattr(self, 'formats_male'):\n            formats = self.formats_male\n        else:\n            formats = self.formats\n        pattern = self.random_element(formats)\n        return self.generator.parse(pattern)\n\n    def name_female(self):\n        if hasattr(self, 'formats_female'):\n            formats = self.formats_female\n        else:\n            formats = self.formats\n        pattern = self.random_element(formats)\n        return self.generator.parse(pattern)\n\n    @classmethod\n    def first_name_male(cls):\n        if hasattr(cls, 'first_names_male'):\n            return cls.random_element(cls.first_names_male)\n        return cls.first_name()\n\n    @classmethod\n    def first_name_female(cls):\n        if hasattr(cls, 'first_names_female'):\n            return cls.random_element(cls.first_names_female)\n        return cls.first_name()\n\n    @classmethod\n    def last_name_male(cls):\n        if hasattr(cls, 'last_names_male'):\n            return cls.random_element(cls.last_names_male)\n        return cls.last_name()\n\n    @classmethod\n    def last_name_female(cls):\n        if hasattr(cls, 'last_names_female'):\n            return cls.random_element(cls.last_names_female)\n        return cls.last_name()\n\n\n    @classmethod\n    def prefix(cls):\n        if hasattr(cls, 'prefixes'):\n            return cls.random_element(cls.prefixes)\n        if hasattr(cls, 'prefixes_male') and hasattr(cls, 'prefixes_female'):\n            return cls.random_element((cls.prefixes_male, cls.prefixes_female))\n        return ''\n\n    @classmethod\n    def prefix_male(cls):\n        if hasattr(cls, 'prefixes_male'):\n            return cls.random_element(cls.prefixes_male)\n        return cls.prefix()\n\n    @classmethod\n    def prefix_female(cls):\n        if hasattr(cls, 'prefixes_female'):\n            return cls.random_element(cls.prefixes_female)\n        return cls.prefix()\n\n    @classmethod\n    def suffix(cls):\n        if hasattr(cls, 'suffixes'):\n            return cls.random_element(cls.suffixes)\n        if hasattr(cls, 'suffixes_male') and hasattr(cls, 'suffixes_female'):\n            return cls.random_element((cls.suffixes_male, cls.suffixes_female))\n        return ''\n\n    @classmethod\n    def suffix_male(cls):\n        if hasattr(cls, 'suffixes_male'):\n            return cls.random_element(cls.suffixes_male)\n        return cls.suffix()\n\n    @classmethod\n    def suffix_female(cls):\n        if hasattr(cls, 'suffixes_female'):\n            return cls.random_element(cls.suffixes_female)\n        return cls.suffix()\n", "path": "faker/providers/person/__init__.py"}]}