'Check the environment and merge it with some settings.'

def merge_environment_settings(self, url, proxies, stream, verify, cert):

    if self.trust_env:
        env_proxies = (get_environ_proxies(url) or {})
        for (k, v) in env_proxies.items():
            proxies.setdefault(k, v)
        if ((verify is True) or (verify is None)):
            verify = (os.environ.get('REQUESTS_CA_BUNDLE') or os.environ.get('CURL_CA_BUNDLE'))
    proxies = merge_setting(proxies, self.proxies)
    stream = merge_setting(stream, self.stream)
    verify = merge_setting(verify, self.verify)
    cert = merge_setting(cert, self.cert)
    return {'verify': verify, 'proxies': proxies, 'stream': stream, 'cert': cert}
