def is_valid(self):
        """
        :return:
            True if the reference is valid, hence it can be read and points to
            a valid object or reference."""
        try:
            self.object
        except (__HOLE__, ValueError):
            return False
        else:
            return True
dataset/ETHPy150Open gitpython-developers/GitPython/git/refs/symbolic.py/SymbolicReference.is_valid