def generate_bands(low, high, increment):
    """Returns a list of bands within low-high based on the increment.
    If low is not at an even increment (e.g., 1378), the first band is between
    low and the next even increment, e.g., [1378, 1500].

    If low is 0, it will be used as is.  Otherwise, 1 will be added to it so
    that bands are generated in the range:
    [[0, 500], [501, 1000], ...]
    or
    [[1001, 1500], [2001, 2500], ...]


    Parameters
    ----------
    low : int
        lower elevation limit of bands
    high : int
        upper elevation limit of bands
    increment : int
        elevation range of each band

    Returns
    -------
    list
        [[band_low, band_high, ], ...]
    """

    if high < low:
        return []

    if (low + increment) > high:
        return [[low, high]]

    # coerce most bands into even multiples of increments
    start = low - (low % increment)
    if start <= low:
        start = start + increment

    bands = [[low if low == 0 else low + 1, start]] + [
        [x + 1, x + increment] for i, x in enumerate(range(start, high, increment))
    ]

    return bands