Distributed learning over multitask networks with linearly related tasks