[Error] 'base' not defined?

I intend to set the background color by using:
[color=darkred] base.setBackgroundColor(0, 0, 0)

When I ran the code, I got errors like:
asser base
NameError: name ‘base’ is not defined

I have no idea why I get such error. I just copy the sample code.
Hope sb. help! Thanks!

Forgot to import a few things?

Like:

import direct.directbase.DirectStart
from direct.showbase import DirectObject