Netflix's content processing pipeline contains stages that must run only after their prerequisite stages complete. Given n stages labeled 0 through n - 1 and a list of dependencies, return any valid execution order for all stages. If the dependencies contain a cycle, return an empty list.
Each dependency [stage, prerequisite] means prerequisite must appear earlier than stage in the result.
Implement order_pipeline(n, dependencies), where n is an integer and dependencies is a list of integer pairs. Return a list containing every stage exactly once, or [] if no valid ordering exists.
def order_pipeline(n, dependencies):