code: def lastpayout(delegate_address, blacklist=None):
          '''
          Assumes that all send transactions from a delegate are payouts.
          Use blacklist to remove rewardwallet and other transactions if the
          address is not a voter. blacklist can contain both addresses and transactionIds'''
          if blacklist and len(blacklist) > 1:
              command_blacklist = 'NOT IN ' + str(tuple(blacklist))
          elif blacklist and len(blacklist) == 1:
              command_blacklist = '!= ' + "'" + blacklist[0] + "'"
          else:
              command_blacklist = "!= 'nothing'"
          qry = DbCursor().execute_and_fetchall(.format(delegate_address, command_blacklist))
          result = []
  
          Payout = namedtuple(
              'payout',
              'address id timestamp')
  
          for i in qry:
              payout = Payout(
                  address=i[0],
                  id=i[1],
                  timestamp=i[2]
              )
              result.append(payout)
          return result
docs: Assumes that all send transactions from a delegate are payouts.
          Use blacklist to remove rewardwallet and other transactions if the
          address is not a voter. blacklist can contain both addresses and transactionIds