<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def open(cls, *args, **kwargs):
 """just something to make it easier to quickly open a connection, do something and then close it"""

        c = cls(*args, **kwargs)
        c.connect()
        try:
            yield c

        finally:
            c.close()