def METHOD_NAME(self,proxy_dic=None):
    '''
    Sets connection proxy.
    if proxy_dic is None get's teh proxy from the system.
    To disable autodetected proxy pass an empty dictionary: {}
    @param proxy_dic: format: {'http': 'http://www.example.com:3128/'}               
    '''
    if proxy_dic is None:
        # The default is to read the list of proxies from the environment variables <protocol>_proxy.
        # If no proxy environment variables are set, then in a Windows environment proxy settings are
        # obtained from the registry's Internet Settings section, and in a Mac OS X environment proxy
        # information is retrieved from the OS X System Configuration
        # Framework.
        proxy = urllib.request.ProxyHandler()
    else:
        # If proxies is given, it must be a dictionary mapping protocol names to
        # URLs of proxies.
        proxy = urllib.request.ProxyHandler(proxy_dic)
    opener = urllib.request.build_opener(proxy)
    urllib.request.install_opener(opener)