A generator object is created by calling a generator function using its name followed by parentheses, such asgen_func().