Find indy-sdk creds matching input filter from within input creds structure,
    json-loaded as returned via HolderProver.get_creds(), and return human-legible summary.

    :param creds: creds structure returned by HolderProver.get_creds(); e.g.,

    ::

        {
            "attrs": {
                "attr0_uuid": [
                    {
                        "interval": null,
                        "cred_info": {
                            "attrs": {
                                "attr0": "2",
                                "attr1": "Hello",
                                "attr2": "World"
                            },
                            "referent": "00000000-0000-0000-0000-000000000000",
                            "schema_id": "Q4zqM7aXqm7gDQkUVLng9h:2:bc-reg:1.0",
                            "cred_def_id": "Q4zqM7aXqm7gDQkUVLng9h:3:CL:18:0",
                            "cred_rev_id": null,
                            "rev_reg_id": null
                        }
                    },
                    {
                        "interval": null,
                        "cred_info": {
                            "attrs": {
                                "attr0": "1",
                                "attr1": "Nice",
                                "attr2": "Tractor"
                            },
                            "referent": "00000000-0000-0000-0000-111111111111",
                            "schema_id": "Q4zqM7aXqm7gDQkUVLng9h:2:bc-reg:1.0",
                            "cred_def_id": "Q4zqM7aXqm7gDQkUVLng9h:3:CL:18:0",
                            "cred_rev_id": null,
                            "rev_reg_id": null
                        }
                    }
                ],
                "attr1_uuid": [
                    {
                        "interval": null,
                        "cred_info": {
                            "attrs": {
                                "attr0": "2",
                                "attr1": "Hello",
                                "attr2": "World"
                            },
                            "referent": "00000000-0000-0000-0000-000000000000",
                            "schema_id": "Q4zqM7aXqm7gDQkUVLng9h:2:bc-reg:1.0",
                            "cred_def_id": "Q4zqM7aXqm7gDQkUVLng9h:3:CL:18:0",
                            "cred_rev_id": null,
                            "rev_reg_id": null
                        }
                    },
                    {
                        "interval": null,
                        "cred_info": {
                            "attrs": {
                                "attr0": "1",
                                "attr1": "Nice",
                                "attr2": "Tractor"
                            },
                            "referent": "00000000-0000-0000-0000-111111111111",
                            "schema_id": "Q4zqM7aXqm7gDQkUVLng9h:2:bc-reg:1.0",
                            "cred_def_id": "Q4zqM7aXqm7gDQkUVLng9h:3:CL:18:0",
                            "cred_rev_id": null,
                            "rev_reg_id": null
                        }
                    }
                ],
                "attr2_uuid": [
                    ...
                ]
            }
        }

    :param filt: filter for matching attributes and values; dict (None or empty for no filter, matching all)
        mapping each cred def identifier to dict mapping attributes to values to match; e.g.,

    ::

        {
            'Q4zqM7aXqm7gDQkUVLng9h:3:CL:18:0': {
                'attr0': 1,  # operation stringifies en passant
                'attr1': 'Nice'
            },
            ...
        }

    :param: filt_dflt_incl: whether to include (True) all attributes for schema that filter does not identify
        or to exclude (False) all such attributes
    :return: human-legible dict mapping credential identifiers to human-readable creds synopses -- not proper
        indy-sdk creds structures (each as per HolderProver.get_creds_display_coarse()) -- for creds matching
        input filter

def creds_display(creds: dict, filt: dict = None, filt_dflt_incl: bool = False) -> dict:
    """
    Find indy-sdk creds matching input filter from within input creds structure,
    json-loaded as returned via HolderProver.get_creds(), and return human-legible summary.

    :param creds: creds structure returned by HolderProver.get_creds(); e.g.,

    ::

        {
            "attrs": {
                "attr0_uuid": [
                    {
                        "interval": null,
                        "cred_info": {
                            "attrs": {
                                "attr0": "2",
                                "attr1": "Hello",
                                "attr2": "World"
                            },
                            "referent": "00000000-0000-0000-0000-000000000000",
                            "schema_id": "Q4zqM7aXqm7gDQkUVLng9h:2:bc-reg:1.0",
                            "cred_def_id": "Q4zqM7aXqm7gDQkUVLng9h:3:CL:18:0",
                            "cred_rev_id": null,
                            "rev_reg_id": null
                        }
                    },
                    {
                        "interval": null,
                        "cred_info": {
                            "attrs": {
                                "attr0": "1",
                                "attr1": "Nice",
                                "attr2": "Tractor"
                            },
                            "referent": "00000000-0000-0000-0000-111111111111",
                            "schema_id": "Q4zqM7aXqm7gDQkUVLng9h:2:bc-reg:1.0",
                            "cred_def_id": "Q4zqM7aXqm7gDQkUVLng9h:3:CL:18:0",
                            "cred_rev_id": null,
                            "rev_reg_id": null
                        }
                    }
                ],
                "attr1_uuid": [
                    {
                        "interval": null,
                        "cred_info": {
                            "attrs": {
                                "attr0": "2",
                                "attr1": "Hello",
                                "attr2": "World"
                            },
                            "referent": "00000000-0000-0000-0000-000000000000",
                            "schema_id": "Q4zqM7aXqm7gDQkUVLng9h:2:bc-reg:1.0",
                            "cred_def_id": "Q4zqM7aXqm7gDQkUVLng9h:3:CL:18:0",
                            "cred_rev_id": null,
                            "rev_reg_id": null
                        }
                    },
                    {
                        "interval": null,
                        "cred_info": {
                            "attrs": {
                                "attr0": "1",
                                "attr1": "Nice",
                                "attr2": "Tractor"
                            },
                            "referent": "00000000-0000-0000-0000-111111111111",
                            "schema_id": "Q4zqM7aXqm7gDQkUVLng9h:2:bc-reg:1.0",
                            "cred_def_id": "Q4zqM7aXqm7gDQkUVLng9h:3:CL:18:0",
                            "cred_rev_id": null,
                            "rev_reg_id": null
                        }
                    }
                ],
                "attr2_uuid": [
                    ...
                ]
            }
        }

    :param filt: filter for matching attributes and values; dict (None or empty for no filter, matching all)
        mapping each cred def identifier to dict mapping attributes to values to match; e.g.,

    ::

        {
            'Q4zqM7aXqm7gDQkUVLng9h:3:CL:18:0': {
                'attr0': 1,  # operation stringifies en passant
                'attr1': 'Nice'
            },
            ...
        }

    :param: filt_dflt_incl: whether to include (True) all attributes for schema that filter does not identify
        or to exclude (False) all such attributes
    :return: human-legible dict mapping credential identifiers to human-readable creds synopses -- not proper
        indy-sdk creds structures (each as per HolderProver.get_creds_display_coarse()) -- for creds matching
        input filter
    """

    rv = {}
    if filt is None:
        filt = {}
    for cred_uuid in creds.get('attrs', {}):
        for cred in creds['attrs'][cred_uuid]:  # creds['attrs'][cred_uuid] is a list of dict
            cred_info = cred['cred_info']
            if cred_info['referent'] in rv:
                continue
            cred_cd_id = cred_info['cred_def_id']
            if (not filt) or (filt_dflt_incl and cred_cd_id not in filt):
                rv[cred_info['referent']] = cred_info
                continue
            if filt and cred_cd_id in filt:
                if ({k: str(filt[cred_cd_id][k]) for k in filt[cred_cd_id]}.items() <= cred_info['attrs'].items()):
                    rv[cred_info['referent']] = cred_info

    return rv