<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def perform_query(self, query, **params):
 """Perform a query, where query is a string."""

        try:
            return self.engine.execute(query, params)
        except:
            print("Error with query: {}".format(query))
            raise