def METHOD_NAME(self, x, y):
    # Check that two xrange objects are equivalent, in the sense of the
    # associated sequences being the same.  We want to use this for large
    # xrange objects, so instead of converting to lists and comparing
    # directly we do a number of indirect checks.
    if len(x) != len(y):
        self.fail('{} and {} have different '
                  'lengths: {} and {} '.format(x, y, len(x), len(y)))
    if len(x) >= 1:
        if x[0] != y[0]:
            self.fail('{} and {} have different initial '
                      'elements: {} and {} '.format(x, y, x[0], y[0]))
        if x[-1] != y[-1]:
            self.fail('{} and {} have different final '
                      'elements: {} and {} '.format(x, y, x[-1], y[-1]))
    if len(x) >= 2:
        x_step = x[1] - x[0]
        y_step = y[1] - y[0]
        if x_step != y_step:
            self.fail('{} and {} have different step: '
                      '{} and {} '.format(x, y, x_step, y_step))