def normalize_strides(
    strides
):
  """Normalize strides of the same format.

  Args:
    strides: An integer or pair of integers.

  Returns:
    A pair of integers.

  Raises:
    ValueError: Input strides is neither an integer nor a pair of integers.
  """
  if isinstance(strides, (list, tuple)) and len(strides) == 2:
    return tuple(strides)
  elif isinstance(strides, int):
    return (strides, strides)
  else:
    raise ValueError(
        'Strides - {} is neither an integer nor a pair of integers.'.format(
            strides))