def expand(self, name):
        """Expand config for `name` by adding a sub-configuration for every
        dot-separated collection "below" the given one (or all, if none given).

        For example, for a database 'mydb' with collections
            ['spiderman.amazing', 'spiderman.spectacular', 'spiderman2']
        and a configuration
            {'host':'foo', 'database':'mydb', 'collection':'spiderman'}
        then `expand("mydb.spiderman")` would add keys for 'spiderman.amazing'
        and 'spiderman.spectacular', but *not* 'spiderman2'.

        :param name: Name, or glob-style pattern, for DB configurations.
        :type name: basestring
        :return: None
        :raises: KeyError (if no such configuration)
        """
        if self._is_pattern(name):
            expr = re.compile(self._pattern_to_regex(name))
            for cfg_name in self._d.keys():
                if expr.match(cfg_name):
                    self._expand(cfg_name)
        else:
            self._expand(name)