<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _exists(self, key):
 """Find a key in a particular section Searches through all the files and looks for matches with a regex. """

        filecache, keycache = self._fileslist()
        msg = keycache.get(key, None)
        if msg:
            path = msg.filename
            meta = filecache[path]
            return path, meta["hostname"], meta.get("flags", "")
        raise KeyError("not found %s" % key)