### How do I define a homomorphism of a graded commutative algebra?

Why does the following throw a `TypeError: images do not define a valid homomorphism`

?

```
E = GradedCommutativeAlgebra(QQ,'x,y',degrees=(1,1))
E.inject_variables()
f = E.hom([x,y])
```

I expected it to define $f$ to be the identity homomorphism of $E$. What is the right way to define a homomorphism of $E$? I'm more interested in the one that switches $x$ and $y$ than the identity homomorphism, but this seemed a more obvious version of the question.