def SetupSharedModules(module_dict):
 output_dict = {}
 for (module_name, module) in module_dict.iteritems():
  if (module is None):
   continue
  if IsEncodingsModule(module_name):
   output_dict[module_name] = module
   continue
  shared_prefix = ModuleNameHasPrefix(module_name, SHARED_MODULE_PREFIXES)
  banned_prefix = ModuleNameHasPrefix(module_name, NOT_SHARED_MODULE_PREFIXES)
  if (shared_prefix and (not banned_prefix)):
   output_dict[module_name] = module
 return output_dict

def SetupSharedModules ( module_dict ) : output_dict = { } for ( module_name , module ) in module_dict . iteritems ( ) : if ( module is None ) : continue if IsEncodingsModule ( module_name ) : output_dict [ module_name ] = module continue shared_prefix = ModuleNameHasPrefix ( module_name , SHARED_MODULE_PREFIXES ) banned_prefix = ModuleNameHasPrefix ( module_name , NOT_SHARED_MODULE_PREFIXES ) if ( shared_prefix and ( not banned_prefix ) ) : output_dict [ module_name ] = module return output_dict
creates a module dictionary for the hardened part of the process .