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

def create_or_update(Name,
           ScheduleExpression=None,
           EventPattern=None,
           Description=None,
           RoleArn=None,
           State=None,
           region=None, key=None, keyid=None, profile=None):
    '''
    Given a valid config, create an event rule.

    Returns {created: true} if the rule was created and returns
    {created: False} if the rule was not created.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_cloudwatch_event.create_or_update my_rule

    '''

    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        kwargs = {}
        for arg in ('ScheduleExpression', 'EventPattern', 'State',
                    'Description', 'RoleArn'):
            if locals()[arg] is not None:
                kwargs[arg] = locals()[arg]
        rule = conn.put_rule(Name=Name,
                              **kwargs)
        if rule:
            log.info('The newly created event rule is %s', rule.get('RuleArn'))

            return {'created': True, 'arn': rule.get('RuleArn')}
        else:
            log.warning('Event rule was not created')
            return {'created': False}
    except ClientError as e:
        return {'created': False, 'error': __utils__['boto3.get_error'](e)}