prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Add support for Message Reactions to ActivityHandler 
  ActivityHandler should be extended to include MessageReactions. This has now been added to the C# and The JavaScript.
  
  Here is a pointer to the JavaScript implementation:
  
  https://github.com/microsoft/botbuilder-js/pull/1038
  
  
  </issue>
  <code>
  [start of libraries/botbuilder-core/botbuilder/core/activity_handler.py]
  1 # Copyright (c) Microsoft Corporation. All rights reserved.
  2 # Licensed under the MIT License.
  3 
  4 from botbuilder.schema import ActivityTypes, ChannelAccount
  5 from .turn_context import TurnContext
  6 
  7 
  8 class ActivityHandler:
  9     async def on_turn(self, turn_context: TurnContext):
  10         if turn_context is None:
  11             raise TypeError("ActivityHandler.on_turn(): turn_context cannot be None.")
  12 
  13         if hasattr(turn_context, "activity") and turn_context.activity is None:
  14             raise TypeError(
  15                 "ActivityHandler.on_turn(): turn_context must have a non-None activity."
  16             )
  17 
  18         if (
  19             hasattr(turn_context.activity, "type")
  20             and turn_context.activity.type is None
  21         ):
  22             raise TypeError(
  23                 "ActivityHandler.on_turn(): turn_context activity must have a non-None type."
  24             )
  25 
  26         if turn_context.activity.type == ActivityTypes.message:
  27             await self.on_message_activity(turn_context)
  28         elif turn_context.activity.type == ActivityTypes.conversation_update:
  29             await self.on_conversation_update_activity(turn_context)
  30         elif turn_context.activity.type == ActivityTypes.event:
  31             await self.on_event_activity(turn_context)
  32         else:
  33             await self.on_unrecognized_activity_type(turn_context)
  34 
  35     async def on_message_activity(  # pylint: disable=unused-argument
  36         self, turn_context: TurnContext
  37     ):
  38         return
  39 
  40     async def on_conversation_update_activity(self, turn_context: TurnContext):
  41         if (
  42             turn_context.activity.members_added is not None
  43             and turn_context.activity.members_added
  44         ):
  45             return await self.on_members_added_activity(
  46                 turn_context.activity.members_added, turn_context
  47             )
  48         if (
  49             turn_context.activity.members_removed is not None
  50             and turn_context.activity.members_removed
  51         ):
  52             return await self.on_members_removed_activity(
  53                 turn_context.activity.members_removed, turn_context
  54             )
  55         return
  56 
  57     async def on_members_added_activity(
  58         self, members_added: ChannelAccount, turn_context: TurnContext
  59     ):  # pylint: disable=unused-argument
  60         return
  61 
  62     async def on_members_removed_activity(
  63         self, members_removed: ChannelAccount, turn_context: TurnContext
  64     ):  # pylint: disable=unused-argument
  65         return
  66 
  67     async def on_event_activity(self, turn_context: TurnContext):
  68         if turn_context.activity.name == "tokens/response":
  69             return await self.on_token_response_event(turn_context)
  70 
  71         return await self.on_event(turn_context)
  72 
  73     async def on_token_response_event(  # pylint: disable=unused-argument
  74         self, turn_context: TurnContext
  75     ):
  76         return
  77 
  78     async def on_event(  # pylint: disable=unused-argument
  79         self, turn_context: TurnContext
  80     ):
  81         return
  82 
  83     async def on_unrecognized_activity_type(  # pylint: disable=unused-argument
  84         self, turn_context: TurnContext
  85     ):
  86         return
  87
  [end of libraries/botbuilder-core/botbuilder/core/activity_handler.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/libraries/botbuilder-core/botbuilder/core/activity_handler.py b/libraries/botbuilder-core/botbuilder/core/activity_handler.py
  --- a/libraries/botbuilder-core/botbuilder/core/activity_handler.py
  +++ b/libraries/botbuilder-core/botbuilder/core/activity_handler.py
  @@ -1,7 +1,8 @@
   # Copyright (c) Microsoft Corporation. All rights reserved.
   # Licensed under the MIT License.
  +from typing import List
   
  -from botbuilder.schema import ActivityTypes, ChannelAccount
  +from botbuilder.schema import ActivityTypes, ChannelAccount, MessageReaction
   from .turn_context import TurnContext
   
   
  @@ -27,6 +28,8 @@
               await self.on_message_activity(turn_context)
           elif turn_context.activity.type == ActivityTypes.conversation_update:
               await self.on_conversation_update_activity(turn_context)
  +        elif turn_context.activity.type == ActivityTypes.message_reaction:
  +            await self.on_message_reaction_activity(turn_context)
           elif turn_context.activity.type == ActivityTypes.event:
               await self.on_event_activity(turn_context)
           else:
  @@ -64,6 +67,27 @@
       ):  # pylint: disable=unused-argument
           return
   
  +    async def on_message_reaction_activity(self, turn_context: TurnContext):
  +        if turn_context.activity.reactions_added is not None:
  +            await self.on_reactions_added(
  +                turn_context.activity.reactions_added, turn_context
  +            )
  +
  +        if turn_context.activity.reactions_removed is not None:
  +            await self.on_reactions_removed(
  +                turn_context.activity.reactions_removed, turn_context
  +            )
  +
  +    async def on_reactions_added(  # pylint: disable=unused-argument
  +        self, message_reactions: List[MessageReaction], turn_context: TurnContext
  +    ):
  +        return
  +
  +    async def on_reactions_removed(  # pylint: disable=unused-argument
  +        self, message_reactions: List[MessageReaction], turn_context: TurnContext
  +    ):
  +        return
  +
       async def on_event_activity(self, turn_context: TurnContext):
           if turn_context.activity.name == "tokens/response":
               return await self.on_token_response_event(turn_context)
  
verification_info: {"golden_diff": "diff --git a/libraries/botbuilder-core/botbuilder/core/activity_handler.py b/libraries/botbuilder-core/botbuilder/core/activity_handler.py\n--- a/libraries/botbuilder-core/botbuilder/core/activity_handler.py\n+++ b/libraries/botbuilder-core/botbuilder/core/activity_handler.py\n@@ -1,7 +1,8 @@\n # Copyright (c) Microsoft Corporation. All rights reserved.\n # Licensed under the MIT License.\n+from typing import List\n \n-from botbuilder.schema import ActivityTypes, ChannelAccount\n+from botbuilder.schema import ActivityTypes, ChannelAccount, MessageReaction\n from .turn_context import TurnContext\n \n \n@@ -27,6 +28,8 @@\n             await self.on_message_activity(turn_context)\n         elif turn_context.activity.type == ActivityTypes.conversation_update:\n             await self.on_conversation_update_activity(turn_context)\n+        elif turn_context.activity.type == ActivityTypes.message_reaction:\n+            await self.on_message_reaction_activity(turn_context)\n         elif turn_context.activity.type == ActivityTypes.event:\n             await self.on_event_activity(turn_context)\n         else:\n@@ -64,6 +67,27 @@\n     ):  # pylint: disable=unused-argument\n         return\n \n+    async def on_message_reaction_activity(self, turn_context: TurnContext):\n+        if turn_context.activity.reactions_added is not None:\n+            await self.on_reactions_added(\n+                turn_context.activity.reactions_added, turn_context\n+            )\n+\n+        if turn_context.activity.reactions_removed is not None:\n+            await self.on_reactions_removed(\n+                turn_context.activity.reactions_removed, turn_context\n+            )\n+\n+    async def on_reactions_added(  # pylint: disable=unused-argument\n+        self, message_reactions: List[MessageReaction], turn_context: TurnContext\n+    ):\n+        return\n+\n+    async def on_reactions_removed(  # pylint: disable=unused-argument\n+        self, message_reactions: List[MessageReaction], turn_context: TurnContext\n+    ):\n+        return\n+\n     async def on_event_activity(self, turn_context: TurnContext):\n         if turn_context.activity.name == \"tokens/response\":\n             return await self.on_token_response_event(turn_context)\n", "issue": "Add support for Message Reactions to ActivityHandler \nActivityHandler should be extended to include MessageReactions. This has now been added to the C# and The JavaScript.\r\n\r\nHere is a pointer to the JavaScript implementation:\r\n\r\nhttps://github.com/microsoft/botbuilder-js/pull/1038\r\n\n", "before_files": [{"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nfrom botbuilder.schema import ActivityTypes, ChannelAccount\nfrom .turn_context import TurnContext\n\n\nclass ActivityHandler:\n    async def on_turn(self, turn_context: TurnContext):\n        if turn_context is None:\n            raise TypeError(\"ActivityHandler.on_turn(): turn_context cannot be None.\")\n\n        if hasattr(turn_context, \"activity\") and turn_context.activity is None:\n            raise TypeError(\n                \"ActivityHandler.on_turn(): turn_context must have a non-None activity.\"\n            )\n\n        if (\n            hasattr(turn_context.activity, \"type\")\n            and turn_context.activity.type is None\n        ):\n            raise TypeError(\n                \"ActivityHandler.on_turn(): turn_context activity must have a non-None type.\"\n            )\n\n        if turn_context.activity.type == ActivityTypes.message:\n            await self.on_message_activity(turn_context)\n        elif turn_context.activity.type == ActivityTypes.conversation_update:\n            await self.on_conversation_update_activity(turn_context)\n        elif turn_context.activity.type == ActivityTypes.event:\n            await self.on_event_activity(turn_context)\n        else:\n            await self.on_unrecognized_activity_type(turn_context)\n\n    async def on_message_activity(  # pylint: disable=unused-argument\n        self, turn_context: TurnContext\n    ):\n        return\n\n    async def on_conversation_update_activity(self, turn_context: TurnContext):\n        if (\n            turn_context.activity.members_added is not None\n            and turn_context.activity.members_added\n        ):\n            return await self.on_members_added_activity(\n                turn_context.activity.members_added, turn_context\n            )\n        if (\n            turn_context.activity.members_removed is not None\n            and turn_context.activity.members_removed\n        ):\n            return await self.on_members_removed_activity(\n                turn_context.activity.members_removed, turn_context\n            )\n        return\n\n    async def on_members_added_activity(\n        self, members_added: ChannelAccount, turn_context: TurnContext\n    ):  # pylint: disable=unused-argument\n        return\n\n    async def on_members_removed_activity(\n        self, members_removed: ChannelAccount, turn_context: TurnContext\n    ):  # pylint: disable=unused-argument\n        return\n\n    async def on_event_activity(self, turn_context: TurnContext):\n        if turn_context.activity.name == \"tokens/response\":\n            return await self.on_token_response_event(turn_context)\n\n        return await self.on_event(turn_context)\n\n    async def on_token_response_event(  # pylint: disable=unused-argument\n        self, turn_context: TurnContext\n    ):\n        return\n\n    async def on_event(  # pylint: disable=unused-argument\n        self, turn_context: TurnContext\n    ):\n        return\n\n    async def on_unrecognized_activity_type(  # pylint: disable=unused-argument\n        self, turn_context: TurnContext\n    ):\n        return\n", "path": "libraries/botbuilder-core/botbuilder/core/activity_handler.py"}]}