def connect(db, host=HACR_DATABASE_SERVER, user=HACR_DATABASE_USER,<EOL>passwd=HACR_DATABASE_PASSWD):
try:<EOL><INDENT>import pymysql<EOL><DEDENT>except ImportError as e:<EOL><INDENT>e.args = ('<STR_LIT>',)<EOL>raise<EOL><DEDENT>return pymysql.connect(host=host, user=user, passwd=passwd, db=db)<EOL>
Connect to the given SQL database