prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Function Role property doesn't work with string value
  The following results in a TypeError for the Role property type. I don't get a TypeError if I use GetAtt for Role's type, but I need to use a string. Looks like an issue in which the expected type is a list of possible types, but the validation on types then thinks the value should be a list instead of being one of the types in the list.
  
  ```
  code = Code(
              S3Bucket=self.s3Bucket,
              S3Key=self.s3Key
          )
  
  func = Function(
          "title",
          Code=code,
          Handler="index.handler",
          Role="role-arn-here",
          Runtime="nodejs",
      )
  ```
  
  ```
    File "C:\Users\bmorin\AppData\Local\Programs\Python\Python35\lib\site-packages\troposphere\__init__.py", line 66, in __init__
      self.__setattr__(k, v)
    File "C:\Users\bmorin\AppData\Local\Programs\Python\Python35\lib\site-packages\troposphere\__init__.py", line 110, in __setattr__
      self._raise_type(name, value, expected_type)
    File "C:\Users\bmorin\AppData\Local\Programs\Python\Python35\lib\site-packages\troposphere\__init__.py", line 145, in _raise_type
      expected_type))
  TypeError: <class 'troposphere.awslambda.Function'>: EventssomeFunction.Role is <class 'str'>, expected [<class 'str'>, <class 'troposphere.GetAtt'>]
  ```
  
  Suspected issue spot in `__init__.py:`
  
  ```
  # If we're expecting a list, then make sure it is a list
  if not isinstance(value, list):
      self._raise_type(name, value, expected_type)
  ```
  
  And the definition of Role in `awslambda.py:`
  
  ```
  class Function(AWSObject):
      resource_type = "AWS::Lambda::Function"
  
      props = {
          'Code': (Code, True),
          'Description': (str, False),
          'Handler': (str, True),
          'MemorySize': (positive_integer, False),
          'Role': ([str, GetAtt], True),
          'Runtime': (str, True),
          'Timeout': (positive_integer, False),
      }
  ```
  
  
  </issue>
  <code>
  [start of troposphere/awslambda.py]
  1 from . import AWSObject, AWSProperty, GetAtt
  2 from .validators import positive_integer
  3 
  4 
  5 class Code(AWSProperty):
  6     props = {
  7         'S3Bucket': (basestring, False),
  8         'S3Key': (basestring, False),
  9         'S3ObjectVersion': (basestring, False),
  10         'ZipFile': (basestring, False)
  11     }
  12 
  13     def validate(self):
  14         zip_file = self.properties.get('ZipFile')
  15         s3_bucket = self.properties.get('S3Bucket')
  16         s3_key = self.properties.get('S3Key')
  17         s3_object_version = self.properties.get('SS3ObjectVersion')
  18 
  19         if zip_file and s3_bucket:
  20             raise ValueError("You can't specify both 'S3Bucket' and 'ZipFile'")
  21         if zip_file and s3_key:
  22             raise ValueError("You can't specify both 'S3Key' and 'ZipFile'")
  23         if zip_file and s3_object_version:
  24             raise ValueError(
  25                 "You can't specify both 'S3ObjectVersion' and 'ZipFile'"
  26             )
  27         if not zip_file and not (s3_bucket and s3_key):
  28             raise ValueError(
  29                 "You must specify a bucket location (both the 'S3Bucket' and "
  30                 "'S3Key' properties) or the 'ZipFile' property"
  31             )
  32 
  33 
  34 class EventSourceMapping(AWSObject):
  35     resource_type = "AWS::Lambda::EventSourceMapping"
  36 
  37     props = {
  38         'BatchSize': (positive_integer, False),
  39         'Enabled': (bool, False),
  40         'EventSourceArn': (basestring, True),
  41         'FunctionName': (basestring, True),
  42         'StartingPosition': (basestring, True),
  43     }
  44 
  45 
  46 class Function(AWSObject):
  47     resource_type = "AWS::Lambda::Function"
  48 
  49     props = {
  50         'Code': (Code, True),
  51         'Description': (basestring, False),
  52         'Handler': (basestring, True),
  53         'MemorySize': (positive_integer, False),
  54         'Role': ([basestring, GetAtt], True),
  55         'Runtime': (basestring, True),
  56         'Timeout': (positive_integer, False),
  57     }
  58 
  59 
  60 class Permission(AWSObject):
  61     resource_type = "AWS::Lambda::Permission"
  62 
  63     props = {
  64         'Action': (basestring, True),
  65         'FunctionName': (basestring, True),
  66         'Principal': (basestring, True),
  67         'SourceAccount': (basestring, False),
  68         'SourceArn': (basestring, False),
  69     }
  70
  [end of troposphere/awslambda.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/troposphere/awslambda.py b/troposphere/awslambda.py
  --- a/troposphere/awslambda.py
  +++ b/troposphere/awslambda.py
  @@ -1,4 +1,4 @@
  -from . import AWSObject, AWSProperty, GetAtt
  +from . import AWSObject, AWSProperty
   from .validators import positive_integer
   
   
  @@ -51,7 +51,7 @@
           'Description': (basestring, False),
           'Handler': (basestring, True),
           'MemorySize': (positive_integer, False),
  -        'Role': ([basestring, GetAtt], True),
  +        'Role': (basestring, True),
           'Runtime': (basestring, True),
           'Timeout': (positive_integer, False),
       }
  
verification_info: {"golden_diff": "diff --git a/troposphere/awslambda.py b/troposphere/awslambda.py\n--- a/troposphere/awslambda.py\n+++ b/troposphere/awslambda.py\n@@ -1,4 +1,4 @@\n-from . import AWSObject, AWSProperty, GetAtt\n+from . import AWSObject, AWSProperty\n from .validators import positive_integer\n \n \n@@ -51,7 +51,7 @@\n         'Description': (basestring, False),\n         'Handler': (basestring, True),\n         'MemorySize': (positive_integer, False),\n-        'Role': ([basestring, GetAtt], True),\n+        'Role': (basestring, True),\n         'Runtime': (basestring, True),\n         'Timeout': (positive_integer, False),\n     }\n", "issue": "Function Role property doesn't work with string value\nThe following results in a TypeError for the Role property type. I don't get a TypeError if I use GetAtt for Role's type, but I need to use a string. Looks like an issue in which the expected type is a list of possible types, but the validation on types then thinks the value should be a list instead of being one of the types in the list.\n\n```\ncode = Code(\n            S3Bucket=self.s3Bucket,\n            S3Key=self.s3Key\n        )\n\nfunc = Function(\n        \"title\",\n        Code=code,\n        Handler=\"index.handler\",\n        Role=\"role-arn-here\",\n        Runtime=\"nodejs\",\n    )\n```\n\n```\n  File \"C:\\Users\\bmorin\\AppData\\Local\\Programs\\Python\\Python35\\lib\\site-packages\\troposphere\\__init__.py\", line 66, in __init__\n    self.__setattr__(k, v)\n  File \"C:\\Users\\bmorin\\AppData\\Local\\Programs\\Python\\Python35\\lib\\site-packages\\troposphere\\__init__.py\", line 110, in __setattr__\n    self._raise_type(name, value, expected_type)\n  File \"C:\\Users\\bmorin\\AppData\\Local\\Programs\\Python\\Python35\\lib\\site-packages\\troposphere\\__init__.py\", line 145, in _raise_type\n    expected_type))\nTypeError: <class 'troposphere.awslambda.Function'>: EventssomeFunction.Role is <class 'str'>, expected [<class 'str'>, <class 'troposphere.GetAtt'>]\n```\n\nSuspected issue spot in `__init__.py:`\n\n```\n# If we're expecting a list, then make sure it is a list\nif not isinstance(value, list):\n    self._raise_type(name, value, expected_type)\n```\n\nAnd the definition of Role in `awslambda.py:`\n\n```\nclass Function(AWSObject):\n    resource_type = \"AWS::Lambda::Function\"\n\n    props = {\n        'Code': (Code, True),\n        'Description': (str, False),\n        'Handler': (str, True),\n        'MemorySize': (positive_integer, False),\n        'Role': ([str, GetAtt], True),\n        'Runtime': (str, True),\n        'Timeout': (positive_integer, False),\n    }\n```\n\n", "before_files": [{"content": "from . import AWSObject, AWSProperty, GetAtt\nfrom .validators import positive_integer\n\n\nclass Code(AWSProperty):\n    props = {\n        'S3Bucket': (basestring, False),\n        'S3Key': (basestring, False),\n        'S3ObjectVersion': (basestring, False),\n        'ZipFile': (basestring, False)\n    }\n\n    def validate(self):\n        zip_file = self.properties.get('ZipFile')\n        s3_bucket = self.properties.get('S3Bucket')\n        s3_key = self.properties.get('S3Key')\n        s3_object_version = self.properties.get('SS3ObjectVersion')\n\n        if zip_file and s3_bucket:\n            raise ValueError(\"You can't specify both 'S3Bucket' and 'ZipFile'\")\n        if zip_file and s3_key:\n            raise ValueError(\"You can't specify both 'S3Key' and 'ZipFile'\")\n        if zip_file and s3_object_version:\n            raise ValueError(\n                \"You can't specify both 'S3ObjectVersion' and 'ZipFile'\"\n            )\n        if not zip_file and not (s3_bucket and s3_key):\n            raise ValueError(\n                \"You must specify a bucket location (both the 'S3Bucket' and \"\n                \"'S3Key' properties) or the 'ZipFile' property\"\n            )\n\n\nclass EventSourceMapping(AWSObject):\n    resource_type = \"AWS::Lambda::EventSourceMapping\"\n\n    props = {\n        'BatchSize': (positive_integer, False),\n        'Enabled': (bool, False),\n        'EventSourceArn': (basestring, True),\n        'FunctionName': (basestring, True),\n        'StartingPosition': (basestring, True),\n    }\n\n\nclass Function(AWSObject):\n    resource_type = \"AWS::Lambda::Function\"\n\n    props = {\n        'Code': (Code, True),\n        'Description': (basestring, False),\n        'Handler': (basestring, True),\n        'MemorySize': (positive_integer, False),\n        'Role': ([basestring, GetAtt], True),\n        'Runtime': (basestring, True),\n        'Timeout': (positive_integer, False),\n    }\n\n\nclass Permission(AWSObject):\n    resource_type = \"AWS::Lambda::Permission\"\n\n    props = {\n        'Action': (basestring, True),\n        'FunctionName': (basestring, True),\n        'Principal': (basestring, True),\n        'SourceAccount': (basestring, False),\n        'SourceArn': (basestring, False),\n    }\n", "path": "troposphere/awslambda.py"}]}