code: def compress_txn_outputs(txn_outputs):
      '''
      Take a list of txn ouputs (from get_txn_outputs output of pybitcointools)
      and compress it to the sum of satoshis sent to each address in a dictionary.
  
      Returns a dict of the following form:
          {'1abc...': 12345, '1def': 54321, ...}
      '''
      result_dict = {}
      outputs = (output for output in txn_outputs if output.get('address'))
      for txn_output in outputs:
          if txn_output['address'] in result_dict:
              result_dict[txn_output['address']] += txn_output['value']
          else:
              result_dict[txn_output['address']] = txn_output['value']
      return result_dicf compress_txn_outputs(txn_outputs):
      '''
      Take a list of txn ouputs (from get_txn_outputs output of pybitcointools)
      and compress it to the sum of satoshis sent to each address in a dictionary.
  
      Returns a dict of the following form:
          {'1abc...': 12345, '1def': 54321, ...}
      '''
      result_dict = {}
      outputs = (output for output in txn_outputs if output.get('address'))
      for txn_output in outputs:
          if txn_output['address'] in result_dict:
              result_dict[txn_output['address']] += txn_output['value']
          else:
              result_dict[txn_output['address']] = txn_output['value']
      return result_dict
docs: Take a list of txn ouputs (from get_txn_outputs output of pybitcointools)
      and compress it to the sum of satoshis sent to each address in a dictionary.
  
      Returns a dict of the following form:
          {'1abc...': 12345, '1def': 54321, ...}