<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GetRegion(region_name):
 """ Converts region name string into boto Region object. """

  regions = boto_ec2.regions()
  region = None
  valid_region_names = []
  for r in regions:
    valid_region_names.append(r.name)
    if r.name == region_name:
        region = r
        break
  if not region:
    logging.info( 'invalid region name: %s ' % (region_name))
    logging.info( 'Try one of these:\n %s' % ('\n'.join(valid_region_names)))
    assert(False)
  return  region