prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  The calculation of the lunar start date throws a TypeError exception for Thailand and Cambodia
  version: 0.47
  stack trace:
  "python39\lib\site-packages\holidays\calendars\thai.py", line 233, in _get_start_date
      return _ThaiLunisolar.START_DATE + td(days=delta_days)
  TypeError: unsupported type for timedelta days component: numpy.int32
  
  </issue>
  <code>
  [start of holidays/helpers.py]
  1 #  holidays
  2 #  --------
  3 #  A fast, efficient Python library for generating country, province and state
  4 #  specific sets of holidays on the fly. It aims to make determining whether a
  5 #  specific date is a holiday as fast and flexible as possible.
  6 #
  7 #  Authors: Vacanza Team and individual contributors (see AUTHORS file)
  8 #           dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
  9 #           ryanss <ryanssdev@icloud.com> (c) 2014-2017
  10 #  Website: https://github.com/vacanza/python-holidays
  11 #  License: MIT (see LICENSE file)
  12 
  13 
  14 def _normalize_arguments(cls, value):
  15     """Normalize arguments.
  16 
  17     :param cls:
  18         A type of arguments to normalize.
  19 
  20     :param value:
  21         Either a single item or an iterable of `cls` type.
  22 
  23     :return:
  24         A set created from `value` argument.
  25 
  26     """
  27     if isinstance(value, cls):
  28         return {value}
  29 
  30     return set(value) if value is not None else set()
  31 
  32 
  33 def _normalize_tuple(data):
  34     """Normalize tuple.
  35 
  36     :param data:
  37         Either a tuple or a tuple of tuples.
  38 
  39     :return:
  40         An unchanged object for tuple of tuples, e.g., ((JAN, 10), (DEC, 31)).
  41         An object put into a tuple otherwise, e.g., ((JAN, 10),).
  42     """
  43     return data if not data or isinstance(data[0], tuple) else (data,)
  44
  [end of holidays/helpers.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/holidays/helpers.py b/holidays/helpers.py
  --- a/holidays/helpers.py
  +++ b/holidays/helpers.py
  @@ -24,13 +24,19 @@
           A set created from `value` argument.
   
       """
  +    if value is None:
  +        return set()
  +
       if isinstance(value, cls):
           return {value}
   
  -    return set(value) if value is not None else set()
  +    try:
  +        return {v if isinstance(v, cls) else cls(v) for v in value}
  +    except TypeError:  # non-iterable
  +        return {value if isinstance(value, cls) else cls(value)}
   
   
  -def _normalize_tuple(data):
  +def _normalize_tuple(value):
       """Normalize tuple.
   
       :param data:
  @@ -40,4 +46,4 @@
           An unchanged object for tuple of tuples, e.g., ((JAN, 10), (DEC, 31)).
           An object put into a tuple otherwise, e.g., ((JAN, 10),).
       """
  -    return data if not data or isinstance(data[0], tuple) else (data,)
  +    return value if not value or isinstance(value[0], tuple) else (value,)
  
verification_info: {"golden_diff": "diff --git a/holidays/helpers.py b/holidays/helpers.py\n--- a/holidays/helpers.py\n+++ b/holidays/helpers.py\n@@ -24,13 +24,19 @@\n         A set created from `value` argument.\n \n     \"\"\"\n+    if value is None:\n+        return set()\n+\n     if isinstance(value, cls):\n         return {value}\n \n-    return set(value) if value is not None else set()\n+    try:\n+        return {v if isinstance(v, cls) else cls(v) for v in value}\n+    except TypeError:  # non-iterable\n+        return {value if isinstance(value, cls) else cls(value)}\n \n \n-def _normalize_tuple(data):\n+def _normalize_tuple(value):\n     \"\"\"Normalize tuple.\n \n     :param data:\n@@ -40,4 +46,4 @@\n         An unchanged object for tuple of tuples, e.g., ((JAN, 10), (DEC, 31)).\n         An object put into a tuple otherwise, e.g., ((JAN, 10),).\n     \"\"\"\n-    return data if not data or isinstance(data[0], tuple) else (data,)\n+    return value if not value or isinstance(value[0], tuple) else (value,)\n", "issue": "The calculation of the lunar start date throws a TypeError exception for Thailand and Cambodia\nversion: 0.47\r\nstack trace:\r\n\"python39\\lib\\site-packages\\holidays\\calendars\\thai.py\", line 233, in _get_start_date\r\n    return _ThaiLunisolar.START_DATE + td(days=delta_days)\r\nTypeError: unsupported type for timedelta days component: numpy.int32\n", "before_files": [{"content": "#  holidays\n#  --------\n#  A fast, efficient Python library for generating country, province and state\n#  specific sets of holidays on the fly. It aims to make determining whether a\n#  specific date is a holiday as fast and flexible as possible.\n#\n#  Authors: Vacanza Team and individual contributors (see AUTHORS file)\n#           dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023\n#           ryanss <ryanssdev@icloud.com> (c) 2014-2017\n#  Website: https://github.com/vacanza/python-holidays\n#  License: MIT (see LICENSE file)\n\n\ndef _normalize_arguments(cls, value):\n    \"\"\"Normalize arguments.\n\n    :param cls:\n        A type of arguments to normalize.\n\n    :param value:\n        Either a single item or an iterable of `cls` type.\n\n    :return:\n        A set created from `value` argument.\n\n    \"\"\"\n    if isinstance(value, cls):\n        return {value}\n\n    return set(value) if value is not None else set()\n\n\ndef _normalize_tuple(data):\n    \"\"\"Normalize tuple.\n\n    :param data:\n        Either a tuple or a tuple of tuples.\n\n    :return:\n        An unchanged object for tuple of tuples, e.g., ((JAN, 10), (DEC, 31)).\n        An object put into a tuple otherwise, e.g., ((JAN, 10),).\n    \"\"\"\n    return data if not data or isinstance(data[0], tuple) else (data,)\n", "path": "holidays/helpers.py"}]}