def trace_helper(x: List[List[List[int]]], y: List[List[List[float]]], labels: List[str]) -> Tuple[(List[go.Scatter], List[str])]:
    '\n    this function gets results prepared by a plot-related function and\n    outputs a tuple including plotly object and its corresponding legend.\n    '
    all_traces = []
    num_chains = len(x)
    num_indices = len(x[0])
    for index in range(num_indices):
        trace = []
        for chain in range(num_chains):
            trace.append(go.Scatter(x=x[chain][index], y=y[chain][index], mode='lines', name=('chain' + str(chain))))
        all_traces.append(trace)
    return (all_traces, labels)
this function gets results prepared by a plot-related function and
outputs a tuple including plotly object and its corresponding legend.
def trace_helper(x: List[List[List[int]]], y: List[List[List[float]]], labels: List[str]) -> Tuple[(List[go.Scatter], List[str])]:
    '\n    this function gets results prepared by a plot-related function and\n    outputs a tuple including plotly object and its corresponding legend.\n    '
    all_traces = []
    num_chains = len(x)
    num_indices = len(x[0])
    for index in range(num_indices):
        trace = []
        for chain in range(num_chains):
            trace.append(go.Scatter(x=x[chain][index], y=y[chain][index], mode='lines', name=('chain' + str(chain))))
        all_traces.append(trace)
    return (all_traces, labels)