def getblock(lines):
 blockfinder = BlockFinder()
 try:
  tokenize.tokenize(iter(lines).next, blockfinder.tokeneater)
 except (EndOfBlock, IndentationError):
  pass
 return lines[:blockfinder.last]

def getblock ( lines ) : blockfinder = BlockFinder ( ) try : tokenize . tokenize ( iter ( lines ) . next , blockfinder . tokeneater ) except ( EndOfBlock , IndentationError ) : pass return lines [ : blockfinder . last ]
extract the block of code at the top of the given list of lines .