<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def diagram(self):
 """ Diagram - inner content of this chart. The diagram can be replaced by another type using change_type method. """

        target = self._embedded.getDiagram()
        target_type = target.getDiagramType()
        cls = _DIAGRAM_TYPES.get(target_type, Diagram)
        return cls(target)