def get_end(model):
    """
    Get the end position of a (feature) location. For point locations
    the position value is returned. In case of uncertain end range,
    the maximum is returned.
    """
    if model.get("location"):
        model = model["location"]
    if model["type"] == "range":
        return model["end"]["position"]
    elif model["type"] == "point":
        return model["position"]