def autocorr(x: Tensor) -> Tuple[(List[int], List[float])]:

    def autocorr_calculation(x: Tensor, lag: int) -> Tensor:
        y1 = x[:(len(x) - lag)]
        y2 = x[lag:]
        sum_product = ((y1 - x.mean(dim=0).expand(y1.size())) * (y2 - x.mean(dim=0).expand(y2.size()))).sum(0)
        return (sum_product / ((len(x) - lag) * torch.var(x, dim=0)))
    max_lag = x.size(0)
    y_axis_data = [autocorr_calculation(x, lag).item() for lag in range(max_lag)]
    x_axis_data = list(range(max_lag))
    return (x_axis_data, y_axis_data)
def autocorr(x: Tensor) -> Tuple[(List[int], List[float])]:

    def autocorr_calculation(x: Tensor, lag: int) -> Tensor:
        y1 = x[:(len(x) - lag)]
        y2 = x[lag:]
        sum_product = ((y1 - x.mean(dim=0).expand(y1.size())) * (y2 - x.mean(dim=0).expand(y2.size()))).sum(0)
        return (sum_product / ((len(x) - lag) * torch.var(x, dim=0)))
    max_lag = x.size(0)
    y_axis_data = [autocorr_calculation(x, lag).item() for lag in range(max_lag)]
    x_axis_data = list(range(max_lag))
    return (x_axis_data, y_axis_data)