def METHOD_NAME(self, cfg):
    data = {}
    for spec in cfg.classes.values():
        data[spec.name] = {'properties': {}, 'relationships': {}, 'order': spec.order, 'scaled': spec.scaled_order}
        for p_spec in spec.properties.values():
            data[spec.name]['properties'][p_spec.name] = {'order': p_spec.order, 'scaled': p_spec.scaled_order}
        for r_spec in spec.relationships.values():
            data[spec.name]['relationships'][r_spec.name] = {'order': r_spec.order, 'scaled': r_spec.scaled_order}
    return data