import pywikibot
from pywikibot import pagegenerators
site = pywikibot.Site("en", "wikipedia")
cat = pywikibot.Category(site,'Category:Dead People')
catliste = listify(cat)
gen = pagegenerators.CategorizedPageGenerator(cat)
for page in gen:
  #Do something with the page object, for example:
  text = page.text
print (text)
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-16-a562542af48a> in <module>()
      3 site = pywikibot.Site("en", "wikipedia")
      4 cat = pywikibot.Category(site,'Category:Dead People')
----> 5 catliste = listify(cat)
      6 gen = pagegenerators.CategorizedPageGenerator(cat)
      7 for page in gen:

NameError: name 'listify' is not defined