<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_boto_ses_connection():
 """ Shortcut for instantiating and returning a boto SESConnection object. :rtype: boto.ses.SESConnection :returns: A boto SESConnection object, from which email sending is done. """


    access_key_id = getattr(
        settings, 'CUCUMBER_SES_ACCESS_KEY_ID',
        getattr(settings, 'AWS_ACCESS_KEY_ID', None))
    access_key = getattr(
        settings, 'CUCUMBER_SES_SECRET_ACCESS_KEY',
        getattr(settings, 'AWS_SECRET_ACCESS_KEY', None))
    region_name = getattr(
        settings, 'CUCUMBER_SES_REGION_NAME',
        getattr(settings, 'AWS_SES_REGION_NAME', None))
    
    if region_name != None:
        return boto.ses.connect_to_region(
            region_name,
            aws_access_key_id=access_key_id,
            aws_secret_access_key=access_key,
        )
    else:
        return boto.connect_ses(
            aws_access_key_id=access_key_id,
            aws_secret_access_key=access_key,
        )