Best way to toggle data tree expanding/collapsing

I have a data tree that looks like this:

enter image description here

The blue button in the header is the master toggle button to expand or collapse all items in the tree.

The issue raised that I'm not sure the best way to approach is:

If the user has partially opened the data tree like above, by clicking the mater toggle button should this make the entire tree collapse or expand? Or should I have two separate buttons, one for collapsing the tree and one for expanding?