def keys(self, args):

        response = self._keys()
        keys = response['keys']

        print('{:<40} {:<24} {:<20} {:<16} {:<10} {:19} {:19} {:4}'.format('API KEY', 'USER', 'DESCRIPTION', 'CUSTOMER', 'RO / RW', 'EXPIRES', 'LAST USED', 'COUNT'))

        for key in keys:
            expire_time = datetime.strptime(key['expireTime'], '%Y-%m-%dT%H:%M:%S.%fZ')
            tz = pytz.timezone(args.timezone)

            try:
                last_used_time = datetime.strptime(key['lastUsedTime'], '%Y-%m-%dT%H:%M:%S.%fZ')
                last_used_time_or_none = last_used_time.replace(tzinfo=pytz.UTC).astimezone(tz).strftime('%Y/%m/%d %H:%M:%S')
            except __HOLE__:
                last_used_time_or_none = 'not used'

            print('{} {:<24} {:<20} {:<16} {:<10} {:19} {:19} {:>5}'.format(
                key['key'],
                key['user'],
                key['text'],
                key.get('customer', '') or '-',
                key['type'],
                expire_time.replace(tzinfo=pytz.UTC).astimezone(tz).strftime('%Y/%m/%d %H:%M:%S'),
                last_used_time_or_none,
                key['count']
            ))
dataset/ETHPy150Open alerta/python-alerta/alerta/shell.py/AlertCommand.keys