def five_by_five_shape(n):
    """
    Determines shape of five by five view, allowing for fewer than 25 observations.

    Parameters:
    n: length of subject list to display

    Returns:
    Dimensions of grid/subplots as (nrows, ncols)
    """
    if n // 5 == 0:
        return (1, n % 5)
    elif n % 5 > 0:
        return ((n // 5) + 1, 5)
    else:
        return (n // 5, 5)