def METHOD_NAME(self):
    """Return a dict representing this course in the form generated by the Course Structure API."""
    return {
        'root': self.id,
        'blocks': {
            child.id: child.to_dict()
            for child in self.pre_order()
        }
    }