        for {{ edge_snake }} in self.{{ edge_name }}:
            edge = self._create_{{edge_snake}}_edge({{ edge_snake }})
            if edge.external_id not in cache:
                edges.append(edge)
                cache.add(edge.external_id)

            if isinstance({{ edge_snake }}, CircularModelApply):
                instances = {{ edge_snake }}._to_instances_apply(cache)
                nodes.extend(instances.nodes)
                edges.extend(instances.edges)
