We study regenerating codes in heterogeneous distributed storage systems including the node repair problem in graphically constrained architectures. We show that the communication cost of repair can be decreased by downloading the amounts of data controlled by the distance of the helper to the failed node. At the same time, given the flexible choice of the repair degree, the optimal repair cost can always be attained by relying on uniform downloads. We also give a construction of codes that attain a general version of the cutset bound for heterogeneous and graphically constrained systems. The codes we construct also support data combining at intermediate nodes during repair.