def METHOD_NAME(attributes: t.Dict[str, t.Any], name: str) -> t.Dict[str, t.Any]:
    ret = {}
    index_re = re.compile(name + r"\[(.*)\]$")
    for key in attributes.keys():
        if m := index_re.match(key):
            ret[m.group(1)] = attributes.get(key)
    return ret