namespace SharedContracts.Python; public interface IPythonEngineService { ILogger Logger { get; } Task InitializePythonEngine(CancellationToken cancellationToken); T ExecuteCommandOrScript(string command, PyModule module, bool throwOnErrors); T ExecutePythonOperation(Func operation, string operationName, bool throwOnErrors); T ExecutePythonOperationWithDefault(Func operation, T? defaultValue, string operationName, bool throwOnErrors, bool logErrors); Task StopPythonEngine(CancellationToken cancellationToken); dynamic? Sys { get; } }