def collecting_callback():
    calls = []

    def cb(**kwargs):
        calls.append(kwargs)

    return cb, calls
Create and return a callback and a list populated with call args
dataset/ETHPy150Open aws/aws-cli/tests/unit/customizations/cloudtrail/test_validation.py/collecting_callback