def order_queryset(queryset, order_by):
    """ Orders a given REST framework queryset by a given order parameter.


    Args:
        queryset: A queryset containing elements
        order_by: A ordering identifier
    Returns:
        queryset: The given queryset which is ordered
    """
    if queryset is not None and len(order_by) > 0:
        queryset = queryset.order_by(
            order_by
        )
    return queryset