You want to create modular Weblogic WLST scripts to reusable the boiler code such as:
Connecting to the Weblogic Servers
Iterating through a list of servers
Generating your UserConfigFile and UserConfigKey
To achieve this modular approach, create your WLSTUtil.py script and make sure to import the WLST Weblogic module:
from wlstModule import *