def _create_pipeline_subgraph(self, pipeline, processors):
        subgraph_list = ['subgraph "cluster%s" { label="%s"; ' % (pipeline.name, pipeline.name)]

        for processor in processors:
            subgraph_list.append('%s [label="%s"]' % (id(processor), processor.node_name) +'\n')

        if self.show_unused_processors:
            used_processors = set(processors)
            all_processors = set([processor for processor in pipeline])
            unused_processors = all_processors.difference(used_processors)

            for processor in used_processors:
                # find unused consumers of all used processors
                for consumer in processor.consumers:
                    if consumer in unused_processors:
                        # create a gray edge between the used processor and the unused consumer
                        subgraph_list.append('%s -> %s [color="gray", fontcolor="gray", style="dotted"]' % (id(processor), id(consumer)))

                # .. and do the same with the error consumers, but use pink as the color
                for error_consumer in processor.error_consumers:
                    if error_consumer in unused_processors:
                        subgraph_list.append('%s -> %s [color="pink", fontcolor="pink", style="dotted"]' % (id(processor), id(error_consumer)))

            for processor in unused_processors:
                # this processor is unused, so render it as a dotted gray node
                subgraph_list.append('%s [label="%s", fontcolor="gray" style="dotted"]' % (id(processor), processor.name) +'\n')

                # since we didn't use this processor, we didn't use its consumers ...
                for consumer in processor.consumers:
                    subgraph_list.append((id(processor), id(consumer)) % '%s -> %s [color="gray", fontcolor="gray", style="dotted"]')

                # ... nor its error consumers:
                for error_consumer in processor.error_consumers:
                    subgraph_list.append('%s -> %s [color="pink", fontcolor="pink", style="dotted"]' % (id(processor), id(error_consumer)))

        subgraph_list.append('}\n')

        return subgraph_list
dataset/ETHPy150Open foundit/Piped/piped/processors/trace_processors.py/DiagramTrace._create_pipeline_subgraph/swapped operands of `%`