While living as a hired hitman for the Italian Mafia , he adheres to the code of the samurai , and interprets and applies the wisdom of the Hagakure in his contracts for the mob .
In the film `` Ghost Dog : The Way of the Samurai '' , Ghost Dog works for the American Mafia .