Minibatch vs Local SGD for Heterogeneous Distributed Learning