<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, host=None, port=None):
 """Connects to given host address and port."""

        host = self.host if host is None else host
        port = self.port if port is None else port
        self.socket.connect(host, port)