def process_input(self, input, baton):
        processors_by_pipeline, unknowns = self._find_processors_and_unknowns(input)
        total_time, mean_time = self._calculate_mean_and_total_time(input)

        graph_list = ['digraph G { labeljust=l \n']

        # Add the unknown nodes to the graph:
        for unknown in unknowns:
            graph_list.append('%s [label="%s"]' % (id(unknown), getattr(unknown, 'name', repr(unknown))))

        # Render return values as unique nodes with a diamond shape
        for trace_step in input:
            if not trace_step['destination']:
                graph_list.append('%s [label="", shape="diamond"]' % id(trace_step['baton']))

        # Create subgraphs for each pipeline in the trace.
        for pipeline, processors in processors_by_pipeline.items():
            subgraph_list = self._create_pipeline_subgraph(pipeline, processors)

            graph_list.append('\n'.join(subgraph_list))
            graph_list.append('\n')

        # Add the traced edges to the graph
        for i, trace_step in enumerate(input):
            traced_edge = self._create_traced_edge_entry(i, trace_step, mean_time)
            graph_list.append(traced_edge)
            graph_list.append('\n')

        graph_list.append('}\n')
        return '\n'.join(graph_list)
dataset/ETHPy150Open foundit/Piped/piped/processors/trace_processors.py/DiagramTrace.process_input/original