nodes: 0, module; 1, function_definition; 2, function_name:csv_to_transactions; 3, parameters; 4, block; 5, identifier:handle; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, expression_statement; 11, expression_statement; 12, expression_statement; 13, for_statement; 14, return_statement; 15, identifier:source_encoding; 16, string:"latin1"; 17, identifier:date_format; 18, string:"%d-%m-%Y"; 19, identifier:thousand_sep; 20, string:"."; 21, identifier:decimal_sep; 22, string:","; 23, comment:"""
          Parses CSV data from stream and returns ``Transactions``.
  
          Args:
              index: The index of this row in the original CSV file. Used for
              sorting ``Transaction``s by their order of appearance.
  
              row: The row containing strings for [transfer_date, posted_date,
              message, money_amount, money_total].
  
              source_encoding: The encoding that will be used to decode strings
              to UTF-8.
  
              date_format: The format of dates in this row.
  
              thousand_sep: The thousand separator in money amounts.
  
              decimal_sep: The decimal separator in money amounts.
  
          Returns:
              A ``Transactions`` object.
          """; 24, assignment; 25, assignment; 26, pattern_list; 27, call; 28, block; 29, identifier:trans; 30, identifier:trans; 31, call; 32, identifier:rows; 33, call; 34, identifier:index; 35, identifier:row; 36, identifier:enumerate; 37, argument_list; 38, expression_statement; 39, identifier:Transactions; 40, argument_list; 41, attribute; 42, argument_list; 43, identifier:rows; 44, call; 45, identifier:csv; 46, identifier:reader; 47, identifier:handle; 48, keyword_argument; 49, keyword_argument; 50, attribute; 51, argument_list; 52, identifier:delimiter; 53, string:";"; 54, identifier:quotechar; 55, string:"\""; 56, identifier:trans; 57, identifier:append; 58, call; 59, attribute; 60, argument_list; 61, identifier:Parse; 62, identifier:csv_row_to_transaction; 63, identifier:index; 64, identifier:row
code: def csv_to_transactions(handle, source_encoding="latin1",
              date_format="%d-%m-%Y", thousand_sep=".", decimal_sep=","):
          """
          Parses CSV data from stream and returns ``Transactions``.
  
          Args:
              index: The index of this row in the original CSV file. Used for
              sorting ``Transaction``s by their order of appearance.
  
              row: The row containing strings for [transfer_date, posted_date,
              message, money_amount, money_total].
  
              source_encoding: The encoding that will be used to decode strings
              to UTF-8.
  
              date_format: The format of dates in this row.
  
              thousand_sep: The thousand separator in money amounts.
  
              decimal_sep: The decimal separator in money amounts.
  
          Returns:
              A ``Transactions`` object.
          """
          trans = Transactions()
          rows = csv.reader(handle, delimiter=";", quotechar="\"")
  
          for index, row in enumerate(rows):
              trans.append(Parse.csv_row_to_transaction(index, row))
  
          return trans