The procedure is generally performed in the second or third trimester .