def get_connection_pool(self, pool_name):
        """Returns a connection pool with a given name
        
        @param pool_name: a connection pool name to look up
        """
        with _database_config_lock :
            pool_set = self._pool_map[pool_name]
            if isinstance(pool_set, collections.Sequence ):
                if len(pool_set) != 1:
                    raise InvalidMethodException('Trying to get a connection pool from defined set of pools') 
                return pool_set[0]
            else:
                return pool_set
Returns a connection pool with a given name
        
        @param pool_name: a connection pool name to look up
        
recipes/Python/577072_Global_database_configuraticontext_aware/recipe-577072.py