<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(package_or_requirement, resource_name):
 """ Similar to pkg_resources.resource_exists but if the resource it not found via pkg_resources it also looks in a predefined list of paths in order to find the resource :param package_or_requirement: the module in which the resource resides :param resource_name: the name of the resource :return: a flag if the file exists :rtype: bool """

    if pkg_resources.resource_exists(package_or_requirement, resource_name):
        return True

    path = _search_in_share_folders(package_or_requirement, resource_name)

    return True if path else False