def find_sanitizer(self, name):
<EOL>name_parts = name.split("<STR_LIT:.>")<EOL>if len(name_parts) < <NUM_LIT:2>:<EOL><INDENT>raise ConfigurationError(<EOL>"<STR_LIT>" % (<EOL>name,<EOL>),<EOL>)<EOL><DEDENT>module_name_suffix = "<STR_LIT:.>".join(name_parts[:-<NUM_LIT:1>])<EOL>function_name = "<STR_LIT>" % (name_parts[-<NUM_LIT:1>],)<EOL>module_name = "<STR_LIT>" % (module_name_suffix,)<EOL>callback = self.find_sanitizer_from_module(<EOL>module_name=module_name,<EOL>function_name=function_name,<EOL>)<EOL>if callback:<EOL><INDENT>return callback<EOL><DEDENT>for addon_package_name in self.addon_packages:<EOL><INDENT>module_name = "<STR_LIT>" % (<EOL>addon_package_name,<EOL>module_name_suffix,<EOL>)<EOL>callback = self.find_sanitizer_from_module(<EOL>module_name=module_name,<EOL>function_name=function_name,<EOL>)<EOL>if callback:<EOL><INDENT>return callback<EOL><DEDENT><DEDENT>module_name = "<STR_LIT>" % (module_name_suffix,)<EOL>callback = self.find_sanitizer_from_module(<EOL>module_name=module_name,<EOL>function_name=function_name,<EOL>)<EOL>if callback:<EOL><INDENT>return callback<EOL><DEDENT>raise ConfigurationError("<STR_LIT>" % (<EOL>name,<EOL>))<EOL>
Searches for a sanitizer function with given name. The name should
contain two parts separated from each other with a dot, the first
part being the module name while the second being name of the function
contained in the module, when it's being prefixed with "sanitize_".

The lookup process consists from three attempts, which are:

1. First package to look the module will be top level package called
   "sanitizers".
2. Module will be looked under the "addon" packages, if they have been
   defined.
3. Finally the sanitation function will be looked from the builtin
   sanitizers located in "database_sanitizer.sanitizers" package.

If none of these provide any results, ConfigurationError will be
thrown.

:param name: "Full name" of the sanitation function containing name
             of the module as well as name of the function.
:type name: str

:return: First function which can be imported with the given name.
:rtype: callable