def flush_pending(function):
    """Attempt to acquire any pending locks.
    """
    s = boto3.Session()
    client = s.client('lambda')
    results = client.invoke(
        FunctionName=function,
        Payload=json.dumps({'detail-type': 'Scheduled Event'})
    )
    content = results.pop('Payload').read()
    pprint.pprint(results)
    pprint.pprint(json.loads(content))