@pelson I had to stare at this for a while before realising that it's not actually doing anything. That's why I've factored it out.

Previously, if `dims_to_collapse` was `None`, then the `dims_to_collapse` variable was set (line 841), but then not used later (lines 847-) **at all** within the rest of the method. I can only assume that this is some legacy (and now redundant) functionality that was not removed.

I still believe it's valid to call this method with no argument, with the intent to collapse the coordinate over all its dimensions; which is more convenient that forcing the caller to enumerate all the dimensions covered by the coordinate to be collapsed. So I'd argue that the call signature shouldn't change.