Python Module Level Variable Resistor Function