code: def search(self, searchstring):
          
          ret = {}
          for user in self.users:
              match = False
              for attr in self.search_attrs:
                  if attr not in self.users[user]:
                      pass
                  elif re.search(searchstring + '.*', self.users[user][attr]):
                      match = True
              if match:
                  ret[user] = self.users[user]
          return ret
docs: Search backend for users
  
          :param searchstring: the search string
          :type searchstring: string
          :rtype: dict of dict ( {<user attr key>: {<attr>: <value>}} )