As you can see in other coments i try to apply it that way:
pipeline.getDeviceConfig().board.gpio[6] = dai::BoardConfig::GPIO(dai::BoardConfig::GPIO::Direction::OUTPUT, dai::BoardConfig::GPIO::Level::HIGH);
I script node are you talking about something like this:
script.setScript(f"""
import GPIO
MX_PIN = 6
GPIO.setup(MX_PIN, GPIO.OUT, GPIO.PULL_DOWN)
GPIO.write(MX_PIN, GPIO.HIGH)
""");