prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  RDS VPC example instance classes are out of date
  https://github.com/cloudtools/troposphere/blob/565247a50bd27a8f45c3e408b466b193473cb9a6/examples/RDS_VPC.py#L67-L76
  
  The current list of instance classes is documented here: https://aws.amazon.com/rds/instance-types/
  
  </issue>
  <code>
  [start of examples/RDS_VPC.py]
  1 # Converted from RDS_VPC.template located at:
  2 # http://aws.amazon.com/cloudformation/aws-cloudformation-templates/
  3 
  4 from troposphere import GetAtt, Join, Output, Parameter, Ref, Template
  5 from troposphere.ec2 import SecurityGroup
  6 from troposphere.rds import DBInstance, DBSubnetGroup
  7 
  8 
  9 t = Template()
  10 
  11 t.add_description(
  12     "AWS CloudFormation Sample Template VPC_RDS_DB_Instance: Sample template "
  13     "showing how to create an RDS DBInstance in an existing Virtual Private "
  14     "Cloud (VPC). **WARNING** This template creates an Amazon Relational "
  15     "Database Service database instance. You will be billed for the AWS "
  16     "resources used if you create a stack from this template.")
  17 
  18 vpcid = t.add_parameter(Parameter(
  19     "VpcId",
  20     Type="String",
  21     Description="VpcId of your existing Virtual Private Cloud (VPC)"
  22 ))
  23 
  24 subnet = t.add_parameter(Parameter(
  25     "Subnets",
  26     Type="CommaDelimitedList",
  27     Description=(
  28         "The list of SubnetIds, for at least two Availability Zones in the "
  29         "region in your Virtual Private Cloud (VPC)")
  30 ))
  31 
  32 dbname = t.add_parameter(Parameter(
  33     "DBName",
  34     Default="MyDatabase",
  35     Description="The database name",
  36     Type="String",
  37     MinLength="1",
  38     MaxLength="64",
  39     AllowedPattern="[a-zA-Z][a-zA-Z0-9]*",
  40     ConstraintDescription=("must begin with a letter and contain only"
  41                            " alphanumeric characters.")
  42 ))
  43 
  44 dbuser = t.add_parameter(Parameter(
  45     "DBUser",
  46     NoEcho=True,
  47     Description="The database admin account username",
  48     Type="String",
  49     MinLength="1",
  50     MaxLength="16",
  51     AllowedPattern="[a-zA-Z][a-zA-Z0-9]*",
  52     ConstraintDescription=("must begin with a letter and contain only"
  53                            " alphanumeric characters.")
  54 ))
  55 
  56 dbpassword = t.add_parameter(Parameter(
  57     "DBPassword",
  58     NoEcho=True,
  59     Description="The database admin account password",
  60     Type="String",
  61     MinLength="1",
  62     MaxLength="41",
  63     AllowedPattern="[a-zA-Z0-9]*",
  64     ConstraintDescription="must contain only alphanumeric characters."
  65 ))
  66 
  67 dbclass = t.add_parameter(Parameter(
  68     "DBClass",
  69     Default="db.m1.small",
  70     Description="Database instance class",
  71     Type="String",
  72     AllowedValues=[
  73         "db.m1.small", "db.m1.large", "db.m1.xlarge", "db.m2.xlarge",
  74         "db.m2.2xlarge", "db.m2.4xlarge"],
  75     ConstraintDescription="must select a valid database instance type.",
  76 ))
  77 
  78 dballocatedstorage = t.add_parameter(Parameter(
  79     "DBAllocatedStorage",
  80     Default="5",
  81     Description="The size of the database (Gb)",
  82     Type="Number",
  83     MinValue="5",
  84     MaxValue="1024",
  85     ConstraintDescription="must be between 5 and 1024Gb.",
  86 ))
  87 
  88 
  89 mydbsubnetgroup = t.add_resource(DBSubnetGroup(
  90     "MyDBSubnetGroup",
  91     DBSubnetGroupDescription="Subnets available for the RDS DB Instance",
  92     SubnetIds=Ref(subnet),
  93 ))
  94 
  95 myvpcsecuritygroup = t.add_resource(SecurityGroup(
  96     "myVPCSecurityGroup",
  97     GroupDescription="Security group for RDS DB Instance.",
  98     VpcId=Ref(vpcid)
  99 ))
  100 
  101 mydb = t.add_resource(DBInstance(
  102     "MyDB",
  103     DBName=Ref(dbname),
  104     AllocatedStorage=Ref(dballocatedstorage),
  105     DBInstanceClass=Ref(dbclass),
  106     Engine="MySQL",
  107     EngineVersion="5.5",
  108     MasterUsername=Ref(dbuser),
  109     MasterUserPassword=Ref(dbpassword),
  110     DBSubnetGroupName=Ref(mydbsubnetgroup),
  111     VPCSecurityGroups=[Ref(myvpcsecuritygroup)],
  112 ))
  113 
  114 t.add_output(Output(
  115     "JDBCConnectionString",
  116     Description="JDBC connection string for database",
  117     Value=Join("", [
  118         "jdbc:mysql://",
  119         GetAtt("MyDB", "Endpoint.Address"),
  120         GetAtt("MyDB", "Endpoint.Port"),
  121         "/",
  122         Ref(dbname)
  123     ])
  124 ))
  125 
  126 print(t.to_json())
  127
  [end of examples/RDS_VPC.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/examples/RDS_VPC.py b/examples/RDS_VPC.py
  --- a/examples/RDS_VPC.py
  +++ b/examples/RDS_VPC.py
  @@ -70,8 +70,17 @@
       Description="Database instance class",
       Type="String",
       AllowedValues=[
  -        "db.m1.small", "db.m1.large", "db.m1.xlarge", "db.m2.xlarge",
  -        "db.m2.2xlarge", "db.m2.4xlarge"],
  +      "db.m5.large", "db.m5.xlarge", "db.m5.2xlarge", "db.m5.4xlarge",
  +      "db.m5.12xlarge", "db.m5.24xlarge", "db.m4.large", "db.m4.xlarge",
  +      "db.m4.2xlarge", "db.m4.4xlarge", "db.m4.10xlarge", "db.m4.16xlarge",
  +      "db.r4.large", "db.r4.xlarge", "db.r4.2xlarge", "db.r4.4xlarge",
  +      "db.r4.8xlarge", "db.r4.16xlarge", "db.x1e.xlarge", "db.x1e.2xlarge",
  +      "db.x1e.4xlarge", "db.x1e.8xlarge", "db.x1e.16xlarge", "db.x1e.32xlarge",
  +      "db.x1.16xlarge", "db.x1.32xlarge", "db.r3.large", "db.r3.xlarge",
  +      "db.r3.2xlarge", "db.r3.4xlarge", "db.r3.8xlarge", "db.t2.micro",
  +      "db.t2.small", "db.t2.medium", "db.t2.large", "db.t2.xlarge",
  +      "db.t2.2xlarge"
  +    ],
       ConstraintDescription="must select a valid database instance type.",
   ))
  
verification_info: {"golden_diff": "diff --git a/examples/RDS_VPC.py b/examples/RDS_VPC.py\n--- a/examples/RDS_VPC.py\n+++ b/examples/RDS_VPC.py\n@@ -70,8 +70,17 @@\n     Description=\"Database instance class\",\n     Type=\"String\",\n     AllowedValues=[\n-        \"db.m1.small\", \"db.m1.large\", \"db.m1.xlarge\", \"db.m2.xlarge\",\n-        \"db.m2.2xlarge\", \"db.m2.4xlarge\"],\n+      \"db.m5.large\", \"db.m5.xlarge\", \"db.m5.2xlarge\", \"db.m5.4xlarge\",\n+      \"db.m5.12xlarge\", \"db.m5.24xlarge\", \"db.m4.large\", \"db.m4.xlarge\",\n+      \"db.m4.2xlarge\", \"db.m4.4xlarge\", \"db.m4.10xlarge\", \"db.m4.16xlarge\",\n+      \"db.r4.large\", \"db.r4.xlarge\", \"db.r4.2xlarge\", \"db.r4.4xlarge\",\n+      \"db.r4.8xlarge\", \"db.r4.16xlarge\", \"db.x1e.xlarge\", \"db.x1e.2xlarge\",\n+      \"db.x1e.4xlarge\", \"db.x1e.8xlarge\", \"db.x1e.16xlarge\", \"db.x1e.32xlarge\",\n+      \"db.x1.16xlarge\", \"db.x1.32xlarge\", \"db.r3.large\", \"db.r3.xlarge\",\n+      \"db.r3.2xlarge\", \"db.r3.4xlarge\", \"db.r3.8xlarge\", \"db.t2.micro\",\n+      \"db.t2.small\", \"db.t2.medium\", \"db.t2.large\", \"db.t2.xlarge\",\n+      \"db.t2.2xlarge\"\n+    ],\n     ConstraintDescription=\"must select a valid database instance type.\",\n ))\n", "issue": "RDS VPC example instance classes are out of date\nhttps://github.com/cloudtools/troposphere/blob/565247a50bd27a8f45c3e408b466b193473cb9a6/examples/RDS_VPC.py#L67-L76\r\n\r\nThe current list of instance classes is documented here: https://aws.amazon.com/rds/instance-types/\n", "before_files": [{"content": "# Converted from RDS_VPC.template located at:\n# http://aws.amazon.com/cloudformation/aws-cloudformation-templates/\n\nfrom troposphere import GetAtt, Join, Output, Parameter, Ref, Template\nfrom troposphere.ec2 import SecurityGroup\nfrom troposphere.rds import DBInstance, DBSubnetGroup\n\n\nt = Template()\n\nt.add_description(\n    \"AWS CloudFormation Sample Template VPC_RDS_DB_Instance: Sample template \"\n    \"showing how to create an RDS DBInstance in an existing Virtual Private \"\n    \"Cloud (VPC). **WARNING** This template creates an Amazon Relational \"\n    \"Database Service database instance. You will be billed for the AWS \"\n    \"resources used if you create a stack from this template.\")\n\nvpcid = t.add_parameter(Parameter(\n    \"VpcId\",\n    Type=\"String\",\n    Description=\"VpcId of your existing Virtual Private Cloud (VPC)\"\n))\n\nsubnet = t.add_parameter(Parameter(\n    \"Subnets\",\n    Type=\"CommaDelimitedList\",\n    Description=(\n        \"The list of SubnetIds, for at least two Availability Zones in the \"\n        \"region in your Virtual Private Cloud (VPC)\")\n))\n\ndbname = t.add_parameter(Parameter(\n    \"DBName\",\n    Default=\"MyDatabase\",\n    Description=\"The database name\",\n    Type=\"String\",\n    MinLength=\"1\",\n    MaxLength=\"64\",\n    AllowedPattern=\"[a-zA-Z][a-zA-Z0-9]*\",\n    ConstraintDescription=(\"must begin with a letter and contain only\"\n                           \" alphanumeric characters.\")\n))\n\ndbuser = t.add_parameter(Parameter(\n    \"DBUser\",\n    NoEcho=True,\n    Description=\"The database admin account username\",\n    Type=\"String\",\n    MinLength=\"1\",\n    MaxLength=\"16\",\n    AllowedPattern=\"[a-zA-Z][a-zA-Z0-9]*\",\n    ConstraintDescription=(\"must begin with a letter and contain only\"\n                           \" alphanumeric characters.\")\n))\n\ndbpassword = t.add_parameter(Parameter(\n    \"DBPassword\",\n    NoEcho=True,\n    Description=\"The database admin account password\",\n    Type=\"String\",\n    MinLength=\"1\",\n    MaxLength=\"41\",\n    AllowedPattern=\"[a-zA-Z0-9]*\",\n    ConstraintDescription=\"must contain only alphanumeric characters.\"\n))\n\ndbclass = t.add_parameter(Parameter(\n    \"DBClass\",\n    Default=\"db.m1.small\",\n    Description=\"Database instance class\",\n    Type=\"String\",\n    AllowedValues=[\n        \"db.m1.small\", \"db.m1.large\", \"db.m1.xlarge\", \"db.m2.xlarge\",\n        \"db.m2.2xlarge\", \"db.m2.4xlarge\"],\n    ConstraintDescription=\"must select a valid database instance type.\",\n))\n\ndballocatedstorage = t.add_parameter(Parameter(\n    \"DBAllocatedStorage\",\n    Default=\"5\",\n    Description=\"The size of the database (Gb)\",\n    Type=\"Number\",\n    MinValue=\"5\",\n    MaxValue=\"1024\",\n    ConstraintDescription=\"must be between 5 and 1024Gb.\",\n))\n\n\nmydbsubnetgroup = t.add_resource(DBSubnetGroup(\n    \"MyDBSubnetGroup\",\n    DBSubnetGroupDescription=\"Subnets available for the RDS DB Instance\",\n    SubnetIds=Ref(subnet),\n))\n\nmyvpcsecuritygroup = t.add_resource(SecurityGroup(\n    \"myVPCSecurityGroup\",\n    GroupDescription=\"Security group for RDS DB Instance.\",\n    VpcId=Ref(vpcid)\n))\n\nmydb = t.add_resource(DBInstance(\n    \"MyDB\",\n    DBName=Ref(dbname),\n    AllocatedStorage=Ref(dballocatedstorage),\n    DBInstanceClass=Ref(dbclass),\n    Engine=\"MySQL\",\n    EngineVersion=\"5.5\",\n    MasterUsername=Ref(dbuser),\n    MasterUserPassword=Ref(dbpassword),\n    DBSubnetGroupName=Ref(mydbsubnetgroup),\n    VPCSecurityGroups=[Ref(myvpcsecuritygroup)],\n))\n\nt.add_output(Output(\n    \"JDBCConnectionString\",\n    Description=\"JDBC connection string for database\",\n    Value=Join(\"\", [\n        \"jdbc:mysql://\",\n        GetAtt(\"MyDB\", \"Endpoint.Address\"),\n        GetAtt(\"MyDB\", \"Endpoint.Port\"),\n        \"/\",\n        Ref(dbname)\n    ])\n))\n\nprint(t.to_json())\n", "path": "examples/RDS_VPC.py"}]}