<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_entry(self, entry, exact=True):
 """ Return the full path to the first entry whose file name equals the given ``entry`` path. Return ``None`` if the entry cannot be found. If ``exact`` is ``True``, the path must be exact, otherwise the comparison is done only on the file name. Example: :: entry = "config.txt" matches: :: config.txt (if exact == True or exact == False) foo/config.txt (if exact == False) foo/bar/config.txt (if exact == False) :param string entry: the entry name to be searched for :param bool exact: look for the exact entry path :rtype: string :raises: same as :func:`~aeneas.container.Container.entries` """

        if exact:
            self.log([u"Finding entry '%s' with exact=True", entry])
            if entry in self.entries:
                self.log([u"Found entry '%s'", entry])
                return entry
        else:
            self.log([u"Finding entry '%s' with exact=False", entry])
            for ent in self.entries:
                if os.path.basename(ent) == entry:
                    self.log([u"Found entry '%s'", ent])
                    return ent
        self.log([u"Entry '%s' not found", entry])
        return None