code: def generate_content_encoding(self):
          
          if self._definition['contentEncoding'] == 'base64':
              with self.l('if isinstance({variable}, str):'):
                  with self.l('try:'):
                      self.l('import base64')
                      self.l('{variable} = base64.b64decode({variable})')
                  with self.l('except Exception:'):
                      self.l('raise JsonSchemaException("{name} must be encoded by base64")')
                  with self.l('if {variable} == "":'):
                      self.l('raise JsonSchemaException("contentEncoding must be base64")')
docs: Means decoding value when it's encoded by base64.
  
          .. code-block:: python
  
              {
                  'contentEncoding': 'base64',
              }