def is_package_installed(self, package_name, version=None):
        with settings(warn_only=True):
            package_string = self.execute("gem list --local | tr '[A-Z]' '[a-z]' | grep %s%s" %
                                          (package_name, version and '(%s)' % version or ''),
                                          stdout=False, sudo=self.use_sudo)
            return package_name in package_string
Returns :data:`True` if the given package is installed via gem in the remote server, :data:`False` otherwise.
dataset/ETHPy150Open python-provy/provy/provy/more/debian/package/gem.py/GemRole.is_package_installed