When, pursuant to an international convention or agreement, a person detained in execution of a sentence handed down by a foreign court is transferred to French territory to serve the part of the sentence remaining to be served there, the execution of the sentence is continued in accordance with the provisions of this code, and in particular this chapter.