Extending fuctionality of is_parallel method to more than two lines