def add_expansion(self, expansion_node):
        """
        Add a child expansion node to the type node's expansions.

        If an expansion node with the same name is already present in type node's expansions, the new and existing
        expansion node's children are merged.

        :param expansion_node: The expansion node to add
        :type expansion_node: ExpansionNode
        """
        # Check for existing expansion node with the same name
        existing_expansion_node = self.get_expansion(expansion_node.name)
        if existing_expansion_node:
            # Expansion node exists with the same name, merge child expansions.
            for child_expansion in expansion_node.expansions:
                existing_expansion_node.add_expansion(child_expansion)
        else:
            # Add the expansion node.
            self._expansions[expansion_node.name] = expansion_node
Add a child expansion node to the type node's expansions.

        If an expansion node with the same name is already present in type node's expansions, the new and existing
        expansion node's children are merged.

        :param expansion_node: The expansion node to add
        :type expansion_node: ExpansionNode