def connect_to_region(region_name, **kw_params):
    for region in regions(**kw_params):
        if region.name == region_name:
            return region.connect(**kw_params)
    return None
Get the user instance from the template context, if possible.
dataset/ETHPy150Open darcyliu/storyboard/boto/ec2/__init__.py/connect_to_region--crossover with--dataset/ETHPy150Open jcassee/django-analytical/analytical/utils.py/get_user_from_context