def combine_opts(global_config, prefix, local_config={}):
 prefixlen = len(prefix)
 subconf = {}
 for (key, value) in global_config.items():
  if key.startswith(prefix):
   key = key[prefixlen:]
   subconf[key] = value
 subconf.update(local_config)
 return subconf

def combine_opts ( global_config , prefix , local_config = { } ) : prefixlen = len ( prefix ) subconf = { } for ( key , value ) in global_config . items ( ) : if key . startswith ( prefix ) : key = key [ prefixlen : ] subconf [ key ] = value subconf . update ( local_config ) return subconf
the master combiner .