human
I wrote the below code

    def _get_tag_value(tags, key):
        "    Extract    values    of    a    map    implemented    as    a    set.\n                                                Ex:    tags    =    {    'tag_foo_value1',    'tag_bar_value2',    'tag_baz_value3'    }\n                                                                key    =    'bar'\n                                                                returns    'value2'\n                                "
        for tag in tags:
            if (tag[:(len(prefix) + len(key))] == (prefix + key)):
                return tag[((len(prefix) + len(key)) + 1):]
        raise KeyError(key)
    def _add_host(clusters, clusterid, host_type, sub_host_type, host):
        '    Add    a    new    host    in    the    clusters    data    structure    '
        if (clusterid not in clusters):
            clusters[clusterid] = {}
        if (host_type not in clusters[clusterid]):
            clusters[clusterid][host_type] = {}
        if (sub_host_type not in clusters[clusterid][host_type]):
            clusters[clusterid][host_type][sub_host_type] = []
        clusters[clusterid][host_type][sub_host_type].append(host)
    clusters = {}
    for host in data:
        try:
            _add_host(clusters=clusters, clusterid=_get_tag_value(host['group_names'], 'clusterid'), host_type=_get_tag_value(host['group_names'], 'host-type'), sub_host_type=_get_tag_value(host['group_names'], 'sub-host-type'), host={'name': host['inventory_hostname'], 'public    IP': host['oo_public_ipv4'], 'private    IP': host['oo_private_ipv4']})
        except KeyError:
            pass
    return clusters

What's a good function header?

What is a Python code to fix + key)):?
assistant
#Here is Python code to fix + key)):
.

def oo_pretty_print_cluster(data, prefix='tag_'):