def _verify_limits(limits):
    """
    Helper function to verify that the row/column limits are sensible.

    Parameters
    ----------
    limits : None|tuple|list

    Returns
    -------
    None|tuple
    """

    if limits is None:
        return limits

    temp_limits = [int(entry) for entry in limits]
    if len(temp_limits) != 2:
        raise ValueError('Got unexpected limits `{}`'.format(limits))
    if not (0 <= temp_limits[0] < temp_limits[1]):
        raise ValueError('Got unexpected limits `{}`'.format(limits))
    return temp_limits[0], temp_limits[1]