<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def connect(self, user=None):
 """ Connect to host. :param user: if user - login session. """


        self.api._tcl_handler.connect()
        if user:
            self.session.login(user)