def unify_var(x, t, v):
        """
        Test if v can be extended with v[x] = t;
        In that case return the extention
        Else return None
        """
        if x in v:
            return unify( v[ x ], t, v)
        elif occur_check(x, t):
            return None
        else:
            return extend(v, x, t)

        Test if v can be extended with v[x] = t;
        In that case return the extention
        Else return None
        
recipes/Python/360698_Extending_pythprolog_syntax/recipe-360698.py