Formulate an answer to this elaborate question: Who were the two parties fighting in the war where Kajiwara Heima served as karō?
Tokugawa shogunate and those seeking to return political power to the Imperial Court