def METHOD_NAME(self):
    dl_dir = self.d.getVar("DL_DIR")
    if dl_dir and os.path.exists(os.path.join(dl_dir, self.archive)):
        bb.utils.copyfile(os.path.join(dl_dir, self.archive), self.localarchive)
        return
    exportvars = ['HTTP_PROXY', 'http_proxy',
                  'HTTPS_PROXY', 'https_proxy',
                  'FTP_PROXY', 'ftp_proxy',
                  'FTPS_PROXY', 'ftps_proxy',
                  'NO_PROXY', 'no_proxy',
                  'ALL_PROXY', 'all_proxy',
                  'SOCKS5_USER', 'SOCKS5_PASSWD']
    cmd = ''
    for var in exportvars:
        val = self.d.getVar(var)
        if val:
            cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd)
    cmd = cmd + "wget -O %s %s" % (self.localarchive, self.uri)
    subprocess.check_output(cmd, shell=True)