def __generateResponse(self,request,response,code=200):
        if isinstance(response, str):
            return Response(code,response,{HttpHeader.CONTENT_TYPE: MediaType.TEXT_PLAIN})
        elif isinstance(response, Response):
            return response
        else:
            (content,contentType) = self.__convertObjectToContentType(request, response)
            return Response(code,content,{HttpHeader.CONTENT_TYPE:contentType})
Replace one child `Node` with another child or children.
dataset/ETHPy150Open jacek99/corepost/corepost/routing.py/RequestRouter.__generateResponse--crossover with--dataset/ETHPy150Open adieu/allbuttonspressed/docutils/nodes.py/Element.replace