<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def describe_key_pairs():
 """ Returns all key pairs for region """

    region_keys = {}
    for r in boto3.client('ec2', 'us-west-2').describe_regions()['Regions']:
        region = r['RegionName']
        client = boto3.client('ec2', region_name=region)
        try:
            pairs = client.describe_key_pairs()
            if pairs:
                region_keys[region] = pairs
        except Exception as e:
            app.logger.info(e)
    return region_keys