Is there a function $f$ with the following properties

- $f$ meromorphic at the upper half plane $\mathfrak h$,
- $f$ is of weight $k$ under a congruence subgroup of $\operatorname{SL}_2(\mathbb Z)$,
- $f$ has an essential singularity at $\infty$.

Modular forms or functions are defined to have good behaviour at $\infty$. But I have not seen an example showing that this is a necessary part of the definition.