async def reply_to_activity(<EOL>self, conversation_id, activity_id, activity, *, custom_headers=None, raw=False, **operation_config):
<EOL>url = self.reply_to_activity.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", conversation_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", activity_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(activity, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>, <NUM_LIT>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>
ReplyToActivity.

        This method allows you to reply to an activity.
        This is slightly different from SendToConversation().
        * SendToConversation(conversationId) - will append the activity to the
        end of the conversation according to the timestamp or semantics of the
        channel.
        * ReplyToActivity(conversationId,ActivityId) - adds the activity as a
        reply to another activity, if the channel supports it. If the channel
        does not support nested replies, ReplyToActivity falls back to
        SendToConversation.
        Use ReplyToActivity when replying to a specific activity in the
        conversation.
        Use SendToConversation in all other cases.

        :param conversation_id: Conversation ID
        :type conversation_id: str
        :param activity_id: activityId the reply is to (OPTIONAL)
        :type activity_id: str
        :param activity: Activity to send
        :type activity: ~botframework.connector.models.Activity
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ResourceResponse or ClientRawResponse if raw=true
        :rtype: ~botframework.connector.models.ResourceResponse or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>`