def joinTraces(self, traceName1, traceName2, traceNameOut = None):
    """
    Join two traces together to produce a new third trace.
    
    @param traceName1:    Name of the first trace
    @param traceName2:    Name of the second trace
    @param traceNameOut:  Name under which resulting trace is saved, or the first trace by default.
    """
    if not traceName1 in self.analyzer.traces:
      self.analyzer.fail("Trace not found: %s" % traceName1)

    if not traceName2 in self.analyzer.traces:
      self.analyzer.fail("Trace not found: %s" % traceName2)
  
    if traceNameOut is None:
      traceNameOut = traceName1
  
    trace = TraceOperations.join(self.analyzer.traces[traceName1], self.analyzer.traces[traceName2])
    self.analyzer.traces[traceNameOut] = trace
    
    self.reportInfo("Traces %s and %s joined to trace %s." % (traceName1, traceName2, traceNameOut))
    return trace
dataset/ETHPy150Open skyostil/tracy/src/analyzer/plugins/core/CorePlugin.py/CoreInteractivePlugin.joinTraces/original