'When generating XML from an XBlock, this method will add the XBlock\'s
license to the XML representation before it is serialized.
It is defined here so that classes that use this mixin can simply refer
to this method, rather than reimplementing it in their XML export
functions.'

def add_license_to_xml(self, node, default=None):

    if getattr(self, 'license', default):
        node.set('license', self.license)
