<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generics(self):
 """Iterates over the defined Generics."""

        defgeneric = lib.EnvGetNextDefgeneric(self._env, ffi.NULL)

        while defgeneric != ffi.NULL:
            yield Generic(self._env, defgeneric)

            defgeneric = lib.EnvGetNextDefgeneric(self._env, defgeneric)