def __init__(self, username, password=None, url="<STR_LIT>",<EOL>password_hash=None):
if bool(password) == bool(password_hash):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>self.username = username<EOL>self.password = password<EOL>self.password_hash = password_hash<EOL>self.url = url<EOL>self.session = requests.Session()<EOL>self.session.verify = True<EOL>self.session.headers['<STR_LIT>'] = '<STR_LIT>'<EOL>for old_name, module in MODULE_MAPPING.items():<EOL><INDENT>name = _get_module_name(module)<EOL>instance = module(self)<EOL>setattr(self, name, instance)<EOL>if old_name != name:<EOL><INDENT>setattr(self, old_name, instance)<EOL><DEDENT><DEDENT>
Initializes the connection with the given username and password.