Laravel Array Sort Python Method Chaining In Python