code: def getblock(lines):
      
      try:
          tokenize.tokenize(ListReader(lines).readline, BlockFinder().tokeneater)
      except EndOfBlock, eob:
          return lines[:eob.args[0]]
      # Fooling the indent/dedent logic implies a one-line definition
      return lines[:1]
docs: Extract the block of code at the top of the given list of lines.