from typing import List


def bbox_to_es_envelope(els: List[float]) -> List[List[float]]:
    """
    Receive a bbox using STAC representation and convert to
    ES 7 envelope convention (top left lon, top lef lat),
             (bottom right lon, bottom right lat)
    """
    assert len(els) == 4, els
    assert els[0] <= els[2], "First lon corner is not western"
    # Make sure that output bbox is top - bottom
    if els[1] < els[3]:
        els[1], els[3] = els[3], els[1]
    bbox_l = list()
    bbox_l.append([els[0], els[1]])
    bbox_l.append([els[2], els[3]])
    return bbox_l