Explain how you would approach a topological sort problem in the context of dependency management for Netflix services.
Implement the approach as a function that returns a valid service order or [] when the dependency graph contains a cycle. Each dependency is a pair [prerequisite, dependent], and services with no dependency may appear anywhere in the valid order.
Input/output contract: services is a list of unique strings and dependencies is a list of dependency pairs. Return a list containing every service exactly once, or an empty list for cyclic input.
def topological_sort(services, dependencies):