<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def connect(self, hostname=None, port=None, tls=False, **kwargs):
 """ Connect to a server, optionally over TLS. See pydle.features.RFC1459Support.connect for misc parameters. """

        if not port:
            if tls:
                port = DEFAULT_TLS_PORT
            else:
                port = rfc1459.protocol.DEFAULT_PORT
        return await super().connect(hostname, port, tls=tls, **kwargs)