def GetRegressionRangeFromSpike(spike_index, versions):
  """Get the regression range based on spike_index and versions."""
  if spike_index < 1 or spike_index >= len(versions):
    return None

  return (versions[spike_index - 1], versions[spike_index])