Python code to give indicator like Nadaraya-Watson Envelope in Tradingview

Job ID: 35455927

Budget: $10 – $30 USD

I need python code for output like Nadaraya-Watson Envelope [LUX] indicator (tradingview.vn)
using Nadaraya–Watson kernel regression, I have the inputs as the closing price of the candles, you will write python code for the output as the upper and lower extreme points