Returns a dictionary containing a subset of configuration options
        that match the specified namespace/prefix. Example usage:
            app.config['IMAGE_STORE_TYPE']='fs'
            app.config['IMAGE_STORE_PATH']='/var/app/images'
            app.config['IMAGE_STORE_BASE_URL']='http://img.website.com'

        The result dictionary `image_store` would look like:
            {
            'type': 'fs',
            'path': '/var/app/images',
            'base_url':'http://image.website.com'
            }
        This is often useful when configuration options map directly to keyword arguments in functions or class constructors.

        :param namespace: a configuration namespace
        :param lowercase: a flag indicating if the keys of the resulting
            dictionary should be lowercase
        :param trim_namespace: a flag indicating if the keys of the resulting
            dictionary should not include the namespace
        :return: a dict instance

def get_namespace(self, namespace, lowercase=True, trim_namespace=True):
        """Returns a dictionary containing a subset of configuration options
        that match the specified namespace/prefix. Example usage:
            app.config['IMAGE_STORE_TYPE']='fs'
            app.config['IMAGE_STORE_PATH']='/var/app/images'
            app.config['IMAGE_STORE_BASE_URL']='http://img.website.com'

        The result dictionary `image_store` would look like:
            {
            'type': 'fs',
            'path': '/var/app/images',
            'base_url':'http://image.website.com'
            }
        This is often useful when configuration options map directly to keyword arguments in functions or class constructors.

        :param namespace: a configuration namespace
        :param lowercase: a flag indicating if the keys of the resulting
            dictionary should be lowercase
        :param trim_namespace: a flag indicating if the keys of the resulting
            dictionary should not include the namespace
        :return: a dict instance
        """
        rv = {}
        for key, value in six.iteritems(self):
            if not key.startswith(namespace):
                continue
            if trim_namespace:
                key = key[len(namespace):]
            else:
                key = key
            if lowercase:
                key = key.lower()
            rv[key] = value
        return rv