This is an example of named parameters with default values. So you can choose to pass in a value for orderBy, but if you don't then it has a value of None (python's null)

line 120 checks if orderBy is None. If it is, then it is the default value and should not be included. If it is not None, then it was passed in as an argument, so the order by clause needs to be added to it