Convert Labview Code To Python