<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, agent='Python'):
 """ Context manager for HTTP Connection state and ensures proper handling of network sockets, sends a GET request. Exception is raised at the yield statement. :yield request: FileIO<Socket> """

        headers = {'User-Agent': agent}
        request = urlopen(Request(self.url, headers=headers))
        try:
            yield request
        finally:
            request.close()