def METHOD_NAME(results):
    dfn = deepcopy(results['result']['definition'])
    attrs = dfn['attributes']
    for attr in dfn['attributes']:
        if 'forms' in attr:
            attr['forms'] = {f['name']: f for f in attr['forms']}
    dfn['attributes_id'] = {attr['id']: attr for attr in attrs}  # attr ID as key
    dfn['attributes'] = {attr['name']: attr for attr in attrs}  # attr name as key
    dfn['metrics_id'] = {m['id']: m for m in dfn['metrics']}
    dfn['metrics'] = {m['name']: m for m in dfn['metrics']}
    return dfn