const pythonBridge = require('python-bridge'); let python = pythonBridge(); python.ex` import math def calculate_square_root(x): for i in range(100000000): print("Hello") `; async function getSquareRoot(num) { const result = await python`calculate_square_root(${num})`; return result; } getSquareRoot(9).then(result => console.log(`Квадратный корень из 9: ${result}`)).finally(() => python.end());