prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  SageMaker Model ContainerDefinition object does not support attribute Mode
  Setting a `Mode` attribute within the ContainerDefinition for both the `PrimaryContainer` and `Containers` attributes for creating a Model resources keeps throwing error - `AttributeError: ContainerDefinition object does not support attribute Mode`.
  
  Within the latest cloudformation docs https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition.html the `Mode` attribute is supported.
  
  Without this support, multiple models container(s) creates/updates cannot be configured.
  
  Would you prefer I open a PR or can I wait if it won't take much.
  
  Thanks.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `troposphere/sagemaker.py`
  Content:
  ```
  1 # Copyright (c) 2012-2018, Mark Peek <mark@peek.org>
  2 # All rights reserved.
  3 #
  4 # See LICENSE file for full license.
  5 
  6 from . import AWSObject, AWSProperty, Tags
  7 from .validators import integer
  8 
  9 
  10 class GitConfig(AWSProperty):
  11     props = {
  12         'Branch': (basestring, False),
  13         'RepositoryUrl': (basestring, True),
  14         'SecretArn': (basestring, False),
  15     }
  16 
  17 
  18 class CodeRepository(AWSObject):
  19     resource_type = "AWS::SageMaker::CodeRepository"
  20 
  21     props = {
  22         'CodeRepositoryName': (basestring, False),
  23         'GitConfig': (GitConfig, True)
  24     }
  25 
  26 
  27 class Endpoint(AWSObject):
  28     resource_type = "AWS::SageMaker::Endpoint"
  29 
  30     props = {
  31         'EndpointName': (basestring, False),
  32         'EndpointConfigName': (basestring, True),
  33         'Tags': (Tags, True)
  34     }
  35 
  36 
  37 class ProductionVariant(AWSProperty):
  38     props = {
  39         'ModelName': (basestring, True),
  40         'VariantName': (basestring, True),
  41         'InitialInstanceCount': (integer, True),
  42         'InstanceType': (basestring, True),
  43         'InitialVariantWeight': (float, True)
  44     }
  45 
  46 
  47 class EndpointConfig(AWSObject):
  48     resource_type = "AWS::SageMaker::EndpointConfig"
  49 
  50     props = {
  51         'EndpointConfigName': (basestring, False),
  52         'ProductionVariants': ([ProductionVariant], True),
  53         'KmsKeyId': (basestring, False),
  54         'Tags': (Tags, True)
  55     }
  56 
  57 
  58 class ContainerDefinition(AWSProperty):
  59     props = {
  60         'ContainerHostname': (basestring, False),
  61         'Environment': (dict, False),
  62         'ModelDataUrl': (basestring, False),
  63         'Image': (basestring, True)
  64     }
  65 
  66 
  67 class VpcConfig(AWSProperty):
  68     props = {
  69         'Subnets': ([basestring], True),
  70         'SecurityGroupIds': ([basestring], True)
  71     }
  72 
  73 
  74 class Model(AWSObject):
  75     resource_type = "AWS::SageMaker::Model"
  76 
  77     props = {
  78         'Containers': ([ContainerDefinition], False),
  79         'ExecutionRoleArn': (basestring, True),
  80         'ModelName': (basestring, False),
  81         'PrimaryContainer': (ContainerDefinition, False),
  82         'Tags': (Tags, False),
  83         'VpcConfig': (VpcConfig, False),
  84     }
  85 
  86 
  87 class NotebookInstanceLifecycleHook(AWSProperty):
  88     props = {
  89         'Content': (basestring, False)
  90     }
  91 
  92 
  93 class NotebookInstanceLifecycleConfig(AWSObject):
  94     resource_type = "AWS::SageMaker::NotebookInstanceLifecycleConfig"
  95 
  96     props = {
  97         'NotebookInstanceLifecycleConfigName': (basestring, False),
  98         'OnCreate': ([NotebookInstanceLifecycleHook], False),
  99         'OnStart': ([NotebookInstanceLifecycleHook], False)
  100     }
  101 
  102 
  103 class NotebookInstance(AWSObject):
  104     resource_type = "AWS::SageMaker::NotebookInstance"
  105 
  106     props = {
  107         'AcceleratorTypes': ([basestring], False),
  108         'AdditionalCodeRepositories': ([basestring], False),
  109         'DefaultCodeRepository': (basestring, False),
  110         'DirectInternetAccess': (basestring, False),
  111         'InstanceType': (basestring, True),
  112         'KmsKeyId': (basestring, False),
  113         'LifecycleConfigName': (basestring, False),
  114         'NotebookInstanceName': (basestring, False),
  115         'RoleArn': (basestring, True),
  116         'RootAccess': (basestring, False),
  117         'SecurityGroupIds': ([basestring], False),
  118         'SubnetId': (basestring, False),
  119         'Tags': (Tags, False),
  120         'VolumeSizeInGB': (integer, False),
  121     }
  122 
  123 
  124 class CognitoMemberDefinition(AWSProperty):
  125     props = {
  126         'CognitoClientId': (basestring, True),
  127         'CognitoUserGroup': (basestring, True),
  128         'CognitoUserPool': (basestring, True),
  129     }
  130 
  131 
  132 class MemberDefinition(AWSProperty):
  133     props = {
  134         'CognitoMemberDefinition': (CognitoMemberDefinition, True),
  135     }
  136 
  137 
  138 class NotificationConfiguration(AWSProperty):
  139     props = {
  140         'NotificationTopicArn': (basestring, True),
  141     }
  142 
  143 
  144 class Workteam(AWSObject):
  145     resource_type = "AWS::SageMaker::Workteam"
  146 
  147     props = {
  148         'Description': (basestring, False),
  149         'MemberDefinitions': ([MemberDefinition], False),
  150         'NotificationConfiguration': (NotificationConfiguration, False),
  151         'Tags': (Tags, False),
  152         'WorkteamName': (basestring, False),
  153     }
  154
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/troposphere/sagemaker.py b/troposphere/sagemaker.py
  --- a/troposphere/sagemaker.py
  +++ b/troposphere/sagemaker.py
  @@ -59,6 +59,7 @@
       props = {
           'ContainerHostname': (basestring, False),
           'Environment': (dict, False),
  +        'Mode': (basestring, False),
           'ModelDataUrl': (basestring, False),
           'Image': (basestring, True)
       }
  
verification_info: {"golden_diff": "diff --git a/troposphere/sagemaker.py b/troposphere/sagemaker.py\n--- a/troposphere/sagemaker.py\n+++ b/troposphere/sagemaker.py\n@@ -59,6 +59,7 @@\n     props = {\n         'ContainerHostname': (basestring, False),\n         'Environment': (dict, False),\n+        'Mode': (basestring, False),\n         'ModelDataUrl': (basestring, False),\n         'Image': (basestring, True)\n     }\n", "issue": "SageMaker Model ContainerDefinition object does not support attribute Mode\nSetting a `Mode` attribute within the ContainerDefinition for both the `PrimaryContainer` and `Containers` attributes for creating a Model resources keeps throwing error - `AttributeError: ContainerDefinition object does not support attribute Mode`.\r\n\r\nWithin the latest cloudformation docs https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition.html the `Mode` attribute is supported.\r\n\r\nWithout this support, multiple models container(s) creates/updates cannot be configured.\r\n\r\nWould you prefer I open a PR or can I wait if it won't take much.\r\n\r\nThanks.\n", "before_files": [{"content": "# Copyright (c) 2012-2018, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject, AWSProperty, Tags\nfrom .validators import integer\n\n\nclass GitConfig(AWSProperty):\n    props = {\n        'Branch': (basestring, False),\n        'RepositoryUrl': (basestring, True),\n        'SecretArn': (basestring, False),\n    }\n\n\nclass CodeRepository(AWSObject):\n    resource_type = \"AWS::SageMaker::CodeRepository\"\n\n    props = {\n        'CodeRepositoryName': (basestring, False),\n        'GitConfig': (GitConfig, True)\n    }\n\n\nclass Endpoint(AWSObject):\n    resource_type = \"AWS::SageMaker::Endpoint\"\n\n    props = {\n        'EndpointName': (basestring, False),\n        'EndpointConfigName': (basestring, True),\n        'Tags': (Tags, True)\n    }\n\n\nclass ProductionVariant(AWSProperty):\n    props = {\n        'ModelName': (basestring, True),\n        'VariantName': (basestring, True),\n        'InitialInstanceCount': (integer, True),\n        'InstanceType': (basestring, True),\n        'InitialVariantWeight': (float, True)\n    }\n\n\nclass EndpointConfig(AWSObject):\n    resource_type = \"AWS::SageMaker::EndpointConfig\"\n\n    props = {\n        'EndpointConfigName': (basestring, False),\n        'ProductionVariants': ([ProductionVariant], True),\n        'KmsKeyId': (basestring, False),\n        'Tags': (Tags, True)\n    }\n\n\nclass ContainerDefinition(AWSProperty):\n    props = {\n        'ContainerHostname': (basestring, False),\n        'Environment': (dict, False),\n        'ModelDataUrl': (basestring, False),\n        'Image': (basestring, True)\n    }\n\n\nclass VpcConfig(AWSProperty):\n    props = {\n        'Subnets': ([basestring], True),\n        'SecurityGroupIds': ([basestring], True)\n    }\n\n\nclass Model(AWSObject):\n    resource_type = \"AWS::SageMaker::Model\"\n\n    props = {\n        'Containers': ([ContainerDefinition], False),\n        'ExecutionRoleArn': (basestring, True),\n        'ModelName': (basestring, False),\n        'PrimaryContainer': (ContainerDefinition, False),\n        'Tags': (Tags, False),\n        'VpcConfig': (VpcConfig, False),\n    }\n\n\nclass NotebookInstanceLifecycleHook(AWSProperty):\n    props = {\n        'Content': (basestring, False)\n    }\n\n\nclass NotebookInstanceLifecycleConfig(AWSObject):\n    resource_type = \"AWS::SageMaker::NotebookInstanceLifecycleConfig\"\n\n    props = {\n        'NotebookInstanceLifecycleConfigName': (basestring, False),\n        'OnCreate': ([NotebookInstanceLifecycleHook], False),\n        'OnStart': ([NotebookInstanceLifecycleHook], False)\n    }\n\n\nclass NotebookInstance(AWSObject):\n    resource_type = \"AWS::SageMaker::NotebookInstance\"\n\n    props = {\n        'AcceleratorTypes': ([basestring], False),\n        'AdditionalCodeRepositories': ([basestring], False),\n        'DefaultCodeRepository': (basestring, False),\n        'DirectInternetAccess': (basestring, False),\n        'InstanceType': (basestring, True),\n        'KmsKeyId': (basestring, False),\n        'LifecycleConfigName': (basestring, False),\n        'NotebookInstanceName': (basestring, False),\n        'RoleArn': (basestring, True),\n        'RootAccess': (basestring, False),\n        'SecurityGroupIds': ([basestring], False),\n        'SubnetId': (basestring, False),\n        'Tags': (Tags, False),\n        'VolumeSizeInGB': (integer, False),\n    }\n\n\nclass CognitoMemberDefinition(AWSProperty):\n    props = {\n        'CognitoClientId': (basestring, True),\n        'CognitoUserGroup': (basestring, True),\n        'CognitoUserPool': (basestring, True),\n    }\n\n\nclass MemberDefinition(AWSProperty):\n    props = {\n        'CognitoMemberDefinition': (CognitoMemberDefinition, True),\n    }\n\n\nclass NotificationConfiguration(AWSProperty):\n    props = {\n        'NotificationTopicArn': (basestring, True),\n    }\n\n\nclass Workteam(AWSObject):\n    resource_type = \"AWS::SageMaker::Workteam\"\n\n    props = {\n        'Description': (basestring, False),\n        'MemberDefinitions': ([MemberDefinition], False),\n        'NotificationConfiguration': (NotificationConfiguration, False),\n        'Tags': (Tags, False),\n        'WorkteamName': (basestring, False),\n    }\n", "path": "troposphere/sagemaker.py"}], "after_files": [{"content": "# Copyright (c) 2012-2018, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject, AWSProperty, Tags\nfrom .validators import integer\n\n\nclass GitConfig(AWSProperty):\n    props = {\n        'Branch': (basestring, False),\n        'RepositoryUrl': (basestring, True),\n        'SecretArn': (basestring, False),\n    }\n\n\nclass CodeRepository(AWSObject):\n    resource_type = \"AWS::SageMaker::CodeRepository\"\n\n    props = {\n        'CodeRepositoryName': (basestring, False),\n        'GitConfig': (GitConfig, True)\n    }\n\n\nclass Endpoint(AWSObject):\n    resource_type = \"AWS::SageMaker::Endpoint\"\n\n    props = {\n        'EndpointName': (basestring, False),\n        'EndpointConfigName': (basestring, True),\n        'Tags': (Tags, True)\n    }\n\n\nclass ProductionVariant(AWSProperty):\n    props = {\n        'ModelName': (basestring, True),\n        'VariantName': (basestring, True),\n        'InitialInstanceCount': (integer, True),\n        'InstanceType': (basestring, True),\n        'InitialVariantWeight': (float, True)\n    }\n\n\nclass EndpointConfig(AWSObject):\n    resource_type = \"AWS::SageMaker::EndpointConfig\"\n\n    props = {\n        'EndpointConfigName': (basestring, False),\n        'ProductionVariants': ([ProductionVariant], True),\n        'KmsKeyId': (basestring, False),\n        'Tags': (Tags, True)\n    }\n\n\nclass ContainerDefinition(AWSProperty):\n    props = {\n        'ContainerHostname': (basestring, False),\n        'Environment': (dict, False),\n        'Mode': (basestring, False),\n        'ModelDataUrl': (basestring, False),\n        'Image': (basestring, True)\n    }\n\n\nclass VpcConfig(AWSProperty):\n    props = {\n        'Subnets': ([basestring], True),\n        'SecurityGroupIds': ([basestring], True)\n    }\n\n\nclass Model(AWSObject):\n    resource_type = \"AWS::SageMaker::Model\"\n\n    props = {\n        'Containers': ([ContainerDefinition], False),\n        'ExecutionRoleArn': (basestring, True),\n        'ModelName': (basestring, False),\n        'PrimaryContainer': (ContainerDefinition, False),\n        'Tags': (Tags, False),\n        'VpcConfig': (VpcConfig, False),\n    }\n\n\nclass NotebookInstanceLifecycleHook(AWSProperty):\n    props = {\n        'Content': (basestring, False)\n    }\n\n\nclass NotebookInstanceLifecycleConfig(AWSObject):\n    resource_type = \"AWS::SageMaker::NotebookInstanceLifecycleConfig\"\n\n    props = {\n        'NotebookInstanceLifecycleConfigName': (basestring, False),\n        'OnCreate': ([NotebookInstanceLifecycleHook], False),\n        'OnStart': ([NotebookInstanceLifecycleHook], False)\n    }\n\n\nclass NotebookInstance(AWSObject):\n    resource_type = \"AWS::SageMaker::NotebookInstance\"\n\n    props = {\n        'AcceleratorTypes': ([basestring], False),\n        'AdditionalCodeRepositories': ([basestring], False),\n        'DefaultCodeRepository': (basestring, False),\n        'DirectInternetAccess': (basestring, False),\n        'InstanceType': (basestring, True),\n        'KmsKeyId': (basestring, False),\n        'LifecycleConfigName': (basestring, False),\n        'NotebookInstanceName': (basestring, False),\n        'RoleArn': (basestring, True),\n        'RootAccess': (basestring, False),\n        'SecurityGroupIds': ([basestring], False),\n        'SubnetId': (basestring, False),\n        'Tags': (Tags, False),\n        'VolumeSizeInGB': (integer, False),\n    }\n\n\nclass CognitoMemberDefinition(AWSProperty):\n    props = {\n        'CognitoClientId': (basestring, True),\n        'CognitoUserGroup': (basestring, True),\n        'CognitoUserPool': (basestring, True),\n    }\n\n\nclass MemberDefinition(AWSProperty):\n    props = {\n        'CognitoMemberDefinition': (CognitoMemberDefinition, True),\n    }\n\n\nclass NotificationConfiguration(AWSProperty):\n    props = {\n        'NotificationTopicArn': (basestring, True),\n    }\n\n\nclass Workteam(AWSObject):\n    resource_type = \"AWS::SageMaker::Workteam\"\n\n    props = {\n        'Description': (basestring, False),\n        'MemberDefinitions': ([MemberDefinition], False),\n        'NotificationConfiguration': (NotificationConfiguration, False),\n        'Tags': (Tags, False),\n        'WorkteamName': (basestring, False),\n    }\n", "path": "troposphere/sagemaker.py"}]}