class_docstr: Tests urllib.request.urlretrieve using the network.
class_docstr_tok: ["Tests","urllib.request.urlretrieve","using","the","network","."]
code: def urlretrieve(self, *args, **kwargs):
      resource = args[0]
      with socket_helper.transient_internet(resource):
          file_location, info = urllib.request.urlretrieve(
              *args, **kwargs
          )
          try:
              yield file_location, info
          finally:
              os_helper.unlink(file_location)
  
imports: import unittest
  from test import support
  from test.support import os_helper
  from test.support import socket_helper
  import contextlib
  import socket
  import urllib.parse
  import urllib.request
  import os
  import email.message
  import time
label_desc: Use image node_id 2 for calling the urlretrieveNetworkTests obj's underlying member method code with example usage: obj.urlretrieve() without return types