def boto3_log(method):
    counter = itertools.count(1)

    def _run_with_logging(*args, **kwargs):
        """
        Run given boto3.ec2.ServiceResource method with exception
        logging for ``ClientError``.
        """
        with AWS_ACTION(
            operation=[method.__name__, args[1:], kwargs],
            count=next(counter)
        ):
            return method(*args, **kwargs)
    return _run_with_logging
Decorator to run a boto3.ec2.ServiceResource method and
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/ebs.py/boto3_log