def METHOD_NAME(self, x, y, dydx, bound):
    """
    Check that `acos_linear_extrapolation` yields points on a line with correct
    slope, and that the function is continuous around `bound`.
    """
    bound_t = torch.tensor(bound, device=x.device, dtype=x.dtype)
    # fit a line: slope * x + bias = y
    x_1 = torch.stack([x, torch.ones_like(x)], dim=-1)
    slope, bias = torch.linalg.lstsq(x_1, y[:, None]).solution.view(-1)[:2]
    desired_slope = (-1.0) / torch.sqrt(1.0 - bound_t**2)
    # test that the desired slope is the same as the fitted one
    self.assertClose(desired_slope.view(1), slope.view(1), atol=1e-2)
    # test that the autograd's slope is the same as the desired one
    self.assertClose(desired_slope.expand_as(dydx), dydx, atol=1e-2)
    # test that the value of the fitted line at x=bound equals
    # arccos(x), i.e. the function is continuous around the bound
    y_bound_lin = (slope * bound_t + bias).view(1)
    y_bound_acos = bound_t.acos().view(1)
    self.assertClose(y_bound_lin, y_bound_acos, atol=1e-2)