<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, format, *args):
 """ Connect a socket to a formatted endpoint Returns 0 if OK, -1 if the endpoint was invalid. """

        return lib.zsock_connect(self._as_parameter_, format, *args)