def METHOD_NAME(self) -> Optional[APIModule]:
    if self.api.has_service("code"):
        res = self.api.services.METHOD_NAME
        # the order is important here
        # its also important that patching only happens once
        if not self.__api_patched:
            self._request_code_execution = res.request_code_execution
            self.__api_patched = True
        res.request_code_execution = self.request_code_execution
        return res
    return None