" The Ghost Writer , " based on a novel by Robert Harris , stars Pierce Brosnan as a former British prime minister and Ewan McGregor as a ghost writer hired to complete his memoirs on an island off the U.S. east coast .