<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def list(region=None, key=None, keyid=None, profile=None):
    '''
    List all buckets owned by the authenticated sender of the request.

    Returns list of buckets

    CLI Example:

    .. code-block:: yaml

        Owner: {...}
        Buckets:
          - {...}
          - {...}

    '''
    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        buckets = conn.list_buckets()
        if not bool(buckets.get('Buckets')):
            log.warning('No buckets found')
        if 'ResponseMetadata' in buckets:
            del buckets['ResponseMetadata']
        return buckets
    except ClientError as e:
        return {'error': __utils__['boto3.get_error'](e)}