

def stat_account(conn, options):
    items = []
    headers = conn.head_account()
    if (options['verbose'] > 1):
        items.extend([('StorageURL', conn.url), ('Auth Token', conn.token)])
    container_count = int(headers.get('x-account-container-count', 0))
    object_count = prt_bytes(headers.get('x-account-object-count', 0), options['human']).lstrip()
    bytes_used = prt_bytes(headers.get('x-account-bytes-used', 0), options['human']).lstrip()
    items.extend([('Account', conn.url.rsplit('/', 1)[(- 1)]), ('Containers', container_count), ('Objects', object_count), ('Bytes', bytes_used)])
    policies = set()
    for (header_key, header_value) in headers.items():
        if header_key.lower().startswith(POLICY_HEADER_PREFIX):
            policy_name = header_key.rsplit('-', 2)[0].split('-', 4)[(- 1)]
            policies.add(policy_name)
    for policy in policies:
        container_count_header = ((POLICY_HEADER_PREFIX + policy) + '-container-count')
        if (container_count_header in headers):
            conn.append(((('Containers in policy "' + policy) + '"'), prt_bytes(headers[container_count_header], options['human']).lstrip()))
        items.extend((((('Objects in policy "' + policy) + '"'), prt_bytes(headers.get(((POLICY_HEADER_PREFIX + policy) + '-object-count'), 0), options['human']).lstrip()), ((('Bytes in policy "' + policy) + '"'), prt_bytes(headers.get(((POLICY_HEADER_PREFIX + policy) + '-bytes-used'), 0), options['human']).lstrip())))
    return (items, headers)

dataset/ETHPy150Open openstack/python-swiftclient/swiftclient/command_helpers.py stat_account/VarMisuse@266/364 `items`->`conn`