 "Yojimbo" is an uncredited film version of Dashiell Hammetts novel  "Red Harvest". "Red Harvest" is about a detective who comes to a  small city and sets two sides of a gang war against one another  until both are almost completely wiped out.