Can you be a little more specific. Patches welcome :-)
The docs do state
Below you will find snippets of code that should work as-is with only a small amount of work to correct any variable assignments and LDAP specifics, e.g. Distinguished Name Syntax, related to the user's own implementation
so they will not work as an exact copy, some user modification is expected.