nodes: 0, module; 1, function_definition; 2, function_name:csv_row_to_transaction; 3, parameters; 4, block; 5, identifier:index; 6, identifier:row; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, expression_statement; 12, expression_statement; 13, expression_statement; 14, expression_statement; 15, expression_statement; 16, expression_statement; 17, expression_statement; 18, return_statement; 19, identifier:source_encoding; 20, string:"latin1"; 21, identifier:date_format; 22, string:"%d-%m-%Y"; 23, identifier:thousand_sep; 24, string:"."; 25, identifier:decimal_sep; 26, string:","; 27, comment:"""
          Parses a row of strings to a ``Transaction`` object.
  
          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 ``Transaction`` object.
  
          """; 28, assignment; 29, assignment; 30, assignment; 31, assignment; 32, assignment; 33, assignment; 34, call; 35, pattern_list; 36, identifier:row; 37, identifier:xfer; 38, call; 39, identifier:posted; 40, call; 41, identifier:message; 42, call; 43, identifier:amount; 44, call; 45, identifier:total; 46, call; 47, identifier:Transaction; 48, argument_list; 49, identifier:xfer; 50, identifier:posted; 51, identifier:message; 52, identifier:amount; 53, identifier:total; 54, attribute; 55, argument_list; 56, attribute; 57, argument_list; 58, attribute; 59, argument_list; 60, attribute; 61, argument_list; 62, attribute; 63, argument_list; 64, identifier:index; 65, identifier:xfer; 66, identifier:posted; 67, identifier:message; 68, identifier:amount; 69, identifier:total; 70, identifier:Parse; 71, identifier:date; 72, identifier:xfer; 73, identifier:Parse; 74, identifier:date; 75, identifier:posted; 76, identifier:Parse; 77, identifier:to_utf8; 78, identifier:message; 79, identifier:source_encoding; 80, identifier:Parse; 81, identifier:money; 82, identifier:amount; 83, identifier:Parse; 84, identifier:money; 85, identifier:total
code: def csv_row_to_transaction(index, row, source_encoding="latin1",
              date_format="%d-%m-%Y", thousand_sep=".", decimal_sep=","):
          """
          Parses a row of strings to a ``Transaction`` object.
  
          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 ``Transaction`` object.
  
          """
          xfer, posted, message, amount, total = row
          xfer = Parse.date(xfer)
          posted = Parse.date(posted)
          message = Parse.to_utf8(message, source_encoding)
          amount = Parse.money(amount)
          total = Parse.money(total)
          return Transaction(index, xfer, posted, message, amount, total)