#NEWLINE# def boto3_log( method ) : #NEWLINE# #INDENT# '\n    Decorator to run a boto3.ec2.ServiceResource method and\n    log additional information about any exceptions that are raised.\n\n    :param func method_name: The method to call.\n\n    :return: A function which will call the method and do\n        the extra exception logging.\n    ' #NEWLINE# counter = itertools . count ( 1 ) #NEWLINE# def _run_with_logging( * args , **kwargs ) : #NEWLINE# #INDENT# '\n        Run given boto3.ec2.ServiceResource method with exception\n        logging for ``ClientError``.\n        ' #NEWLINE# with AWS_ACTION ( operation = [ method . __name__ , args [ 1 : ] , kwargs ] , count = next ( counter ) ) : #NEWLINE# #INDENT# return method ( * args , ** kwargs ) #NEWLINE# #UNINDENT# #UNINDENT# return _run_with_logging