def yaml(self):
        return yaml.dump(self.serialized, default_flow_style=False,
                         encoding=None)
def _find_user(self, dn):
        return next(i for (i, d) in enumerate(self.directory) if d["dn"] == dn)