<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resource_exists(self, slug, locale, project_slug=None):
 """Return True if a Resource with the given slug exists in locale."""


        try:
            resource = resources.Resource.get(
                project_slug=project_slug or self.get_project_slug(locale),
                slug=slug,
            )

            return resource

        except NotFoundError:
            pass

        return None