code: def turn_on_internet(verbose=False):
      """
      Restore internet access.  Not used, but kept in case it is needed.
      """
  
      global INTERNET_OFF
      global _orig_opener
  
      if not INTERNET_OFF:
          return
  
      INTERNET_OFF = False
  
      if verbose:
          print("Internet access enabled")
  
      urllib.request.install_opener(_orig_opener)
  
      socket.create_connection = socket_create_connection
      socket.socket.bind = socket_bind
      socket.socket.connect = socket_connect
      return socket
  
file_path: catboost/contrib/python/matplotlib/py2/matplotlib/testing/disable_internet.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import contextlib
  import socket
  from six.moves import urllib
label_desc: Use image node_id 3 for calling a global function with example usage: turn_on_internet(verbose) and returns: socket