<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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))