Python: NameError while using nested classes
<p>I encountered with the following error:</p>

<pre><code>NameError: name 'JsonCleaner' is not defined
</code></pre>

<p>The line, causing the error is the first pair in dictionary <code>ERROR_CODES_MAPPING_DICT</code> (see code below):</p>

<pre><code>from sshop.engine.models import WrongJsonError

class JsonCleaner:


    class NormalizeError(Exception):

        ERROR_NO_CODE = 0
        ERROR_TYPE_MISMATCH = 1
        ERROR_WRONG_VALUE = 2
        ERROR_LACK_OF_FIELD = 3

        def __init__(self, error_desc, error_code=ERROR_NO_CODE):
            self.error_desc = error_desc
            self.error_code = error_code

        def __unicode__(self):
            return repr(self.error_desc)


    # .... some methods ........


    ERROR_CODES_MAPPING_DICT = {
        # Line where exception is raised:
        JsonCleaner.NormalizeError.ERROR_NO_CODE:       WrongJsonError.NO_ERROR, 
        JsonCleaner.NormalizeError.ERROR_LACK_OF_FIELD: WrongJsonError.ERROR_LACK_OF_FIELD,
        JsonCleaner.NormalizeError.ERROR_TYPE_MISMATCH: WrongJsonError.ERROR_TYPE_MISMATCH,
        JsonCleaner.NormalizeError.ERROR_WRONG_VALUE:   WrongJsonError.ERROR_WRONG_VALUE, 
    }
</code></pre>

<p>What am I doing wrong?</p>
