def _adjust_params(kwargs):
    timeout = kwargs.get('timeout')
    if timeout is not None:
        timeout = int(timeout)
        if timeout <= 0:
            timeout = None

    insecure = strutils.bool_from_string(kwargs.get('insecure'))
    verify = kwargs.get('verify')
    if verify is None:
        if insecure:
            verify = False
        else:
            verify = kwargs.get('cacert') or True

    cert = kwargs.get('cert_file')
    key = kwargs.get('key_file')
    if cert and key:
        cert = cert, key
    return {'verify': verify, 'cert': cert, 'timeout': timeout}
dataset/ETHPy150Open openstack/python-cloudkittyclient/cloudkittyclient/client.py/_adjust_params/original