nodes: 0, module; 1, function_definition; 2, function_name:iter_prefix; 3, parameters; 4, block; 5, identifier:reader; 6, identifier:key; 7, expression_statement; 8, return_statement; 9, comment:"""
      Creates an iterator which iterates over lines that start with prefix
      'key' in a sorted text file.
      """; 10, call; 11, attribute; 12, argument_list; 13, identifier:itertools; 14, identifier:takewhile; 15, lambda; 16, call; 17, lambda_parameters; 18, call; 19, identifier:search; 20, argument_list; 21, identifier:line; 22, attribute; 23, argument_list; 24, identifier:reader; 25, identifier:key; 26, identifier:line; 27, identifier:startswith; 28, identifier:key
code: def iter_prefix(reader, key):
      """
      Creates an iterator which iterates over lines that start with prefix
      'key' in a sorted text file.
      """
  
      return itertools.takewhile(
          lambda line: line.startswith(key),
          search(reader, key))