def occur_check(x, t):
        """
        Test if the variable x occurr in structure t
        """
        if x == t:
            return True
        elif isinstance(t, Struct):
            return t.head == x.head or occur_check(x, t.subs)
        return False

        Test if the variable x occurr in structure t
        
recipes/Python/360698_Extending_pythprolog_syntax/recipe-360698.py