The docstring for read_header says that it will return the values attrs, coords, variables, and even shows an example where the values are used in this order, but the return line is return attrs, coords, variables.
Please update the documentation to match the code, not the other way around.