<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def size(config, accounts=(), day=None, group=None, human=True, region=None):
 """size of exported records for a given day."""

    config = validate.callback(config)
    destination = config.get('destination')
    client = boto3.Session().client('s3')
    day = parse(day)

    def export_size(client, account):
        paginator = client.get_paginator('list_objects_v2')
        count = 0
        size = 0
        session = get_session(account['role'], region)
        account_id = session.client('sts').get_caller_identity()['Account']
        prefix = destination.get('prefix', '').rstrip('/') + '/%s' % account_id
        prefix = "%s/%s/%s" % (prefix, group, day.strftime("%Y/%m/%d"))
        account['account_id'] = account_id
        for page in paginator.paginate(
                Bucket=destination['bucket'],
                Prefix=prefix):
            for k in page.get('Contents', ()):
                size += k['Size']
                count += 1
        return (count, size)

    total_size = 0
    accounts_report = []
    logging.getLogger('botocore').setLevel(logging.ERROR)
    with ThreadPoolExecutor(max_workers=16) as w:
        futures = {}
        for account in config.get('accounts'):
            if accounts and account['name'] not in accounts:
                continue
            futures[w.submit(export_size, client, account)] = account

        for f in as_completed(futures):
            account = futures[f]
            count, size = f.result()
            account.pop('role')
            account.pop('groups')
            total_size += size
            if human:
                account['size'] = GetHumanSize(size)
            else:
                account['size'] = size
            account['count'] = count
            accounts_report.append(account)

    accounts_report.sort(key=operator.itemgetter('count'), reverse=True)
    print(tabulate(accounts_report, headers='keys'))
    log.info("total size:%s", GetHumanSize(total_size))