def wrap_aws_conn(raw_conn):
    def retry_if(ex):
        """Retry if we get a server error indicating throttling. Also
        handle spurious 505s that are thought to be part of a load
        balancer issue inside AWS."""
        return ((isinstance(ex, boto.exception.BotoServerError) and
                 ('Throttling' in ex.body or
                  'RequestExpired' in ex.body or
                  ex.status == 505)) or
                (isinstance(ex, socket.error) and
                 ex.args in ((104, 'Connection reset by peer'),
                             (110, 'Connection timed out'))))

    return RetryWrapper(raw_conn,
                        retry_if=retry_if,
                        backoff=_EMR_BACKOFF,
                        multiplier=_EMR_BACKOFF_MULTIPLIER,
                        max_tries=_EMR_MAX_TRIES)
Because this module is not specific to any cloud providers, there will be
dataset/ETHPy150Open Yelp/mrjob/mrjob/fs/s3.py/wrap_aws_conn--crossover with--dataset/ETHPy150Open saltstack/salt/salt/cloud/clouds/saltify.py/list_nodes