For example they could've taken the subway system from London (which is probably completely wrong but I don't remember any of it and I couldn't find it on google)
The violent opening of Japanese ports by colonial powers in the 19th century prompted Japan to start a hasty process of industrialisation after western examples.
Japan imported westerns technologies in an effort to modernise their infrastructure and farming methods. For example there was a close relationship between the german empire and Japan concerning all things industrial. The city I'm from, Augsburg, is where the Diesel engine was invented and to this day we have many city partnerships with Japan, and received many Japanese gardens as gifts for the technical assistance.
Later on when nazi germnay allied with Japan, these earlier connections played an important role.
As one data point, Japan adopted the Meiji Civil Code of 1898 as its legal code, and it was explicitly modeled after the German legal code that was then in force.