in packages/autorest.python/autorest/m4reformatter/__init__.py [0:0]
def filter_out_paging_next_operation(yaml_data: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
next_operations: Set[str] = set()
for operation in yaml_data:
next_operation = operation.get("nextOperation")
if not next_operation:
continue
next_operations.add(next_operation["name"])
return [o for o in yaml_data if o["name"] not in next_operations]