def METHOD_NAME(instance):
    engine = instance.databaseinfra.engine
    return {
        'name': instance.name,
        'environment': instance.environment.name,
        'engine': '{} {}'.format(
            engine.engine_type.name,
            engine.version
        )
    }