Lone Wolf and Cub: Baby Cart to Hades

In this third 'Lone Wolf and Cub' movie, Ogami Itto, the disgraced former shogun's executioner, or Kogi Kaishakunin, is travelling by river on a boat with his young son Daigoro floating behind in the baby cart. A young woman at the front of the boat, clearly distraught for some reason, accidentally drops a bundle into the water, which Daigoro retrieves.Itto, meanwhile, draws his sword part way and notices in the reflection on the blade that some bamboo reeds are also trailing the boat. Itto is being followed by operatives of his mortal enemy, the Yagyu Clan; a constant threat that he can never ignore. Later, as Daigoro is relieving himself in a bamboo glade, Itto slices some bamboo stalks, causing some ninja assasins to fall from their perch.According to the voice-over narrator, this is a time in the Edo period in Japan when there are ronin, or at the very least a low-class of samurai termed "watari-kashi"; small bands of fighters who move from job to job, working from one "daimyo" (feud lord) to the next, depending on who's hiring.A group of four watari-kashi are idling along the road. Hot and bored, they spy an attractive young woman and her mother being escorted by a servant. Three of them run off to take advantage, but one of the band Kanbei, the more honorable of the four remains uninterested. The three knock the escort unconscious and proceed to rape the two women. The servant regains consciousness and is furious when he sees the triad violating his mistresses. He attempts to beat them with his bamboo pole, but is slain by Kanbei, who then also slays the two women to silence them. Kanbei then makes his three companions draw straws, saying the one unfortunate enough to draw the short straw will be killed to take the blame for the rapes and murders.Itto happens along this grim scene just as Kanbei is slaying the watari-kashi who drew the short straw. Itto kills the other two rapists when they attempt to attack him. Kanbei recognizes Itto and requests a duel. Itto accepts and they prepare, but at the last second Itto re-sheathes his sword and calls it a draw, leaving Kanbei to ponder his fate alone. "You are a true warrior," Itto says, "One I hope lives on."At an inn, it turns out that the young woman from the boat is to be sold into prostitution. Her pimp tries to have his way with her, but she bites off his tongue, spitting the bloody appendage onto the floor. The pimp dies from the injury.The girl seeks refuge in Itto's room, who steps in to protect her from the local police. But then the town's real authorities show up which are the local Yakuza, led by a young woman named Torizo. Some verbal sparring begins as Itto defends the girl against Torizo's threats. After Torizo pulls out a pistol and fires at shot at Itto's feet to indimidate him into surrendering the girl, Itto agrees to act as a substitute for the young woman and undergo "buri-buri", a form of torture that involves the subject being hogtied and hung in the air and repeatedly dunked headfirst into a tub of water. The subject is then beaten to unconsciousness by men wielding thick rattan canes and shouting "buri-buri". Itto endures the torture with his typical stoicism. This frees the young woman from having to work as a prostitute.Itto, still with a debt to pay for the death of the pimp, agrees to take on an assassination for Torizo and her father, a one-armed man that Itto is acquainted with from his past life as the shogun's executioner - acting as second during the execution of a daimyo who, fear-stricken, struggled dishonourably; Torizo's father had restrained the daimyo, sacrificing his arm to Itto's killing stroke.The target is a corrupt district deputy. Initially Itto is to face the deputy's personal bodyguards, one of whom is a sharpshooter and quick-draw artist who wields a pair of revolvers. Through cunning and guile (and the help of his young son Daigoro, who acts as a decoy), Itto defeats the armed man and takes his guns. The other is defeated by Itto in a sword duel.Itto's battle culminates in his facing the deputy's army perhaps 200 men singlehandedly. For the first time, the true power of the baby cart is revealed as it proves to harbor an entire arsenal of weapons, including spears, daggers, a bullet-proof shield, and a small battery of guns, capable of taking out many enemy soldiers like a heavy machine gun. All of the deputy's men are killed as Itto first takes out half of them with the baby cart's machine gun, and then takes out the rest with his sword and other weapons from the baby cart. The deputy is the last to fall when Itto, deprived of his sword when it falls out of his hands when he falls down an embankment, takes out one of the pistols he took earlier from the deputy bodyguard and uses it to shoot and kill the deputy. Itto then discards the gun and reclaims his sword, mumbling to himself that firearms are so uncivilized.Word of the fight has been passed to neighboring districts, and the ronin Kanbei shows up just after Itto has slain the deputy, and makes his demand again for a duel. Though battle-weary, Itto accepts the challenge. The fight is over in an instant. Itto is sliced across his back, but Kanbei is mortally wounded, impaled on Itto's Dotanuki battle sword.As Kanbei kneels to the ground, dying, he tells Itto his story and why he became a ronin a tale involving an ambush on his master's convoy. Seeing his side outnumbered, Kanbei seized an opportunity and ran ahead to attack the enemy head on. He surprised the enemy and prevailed in deflecting the hostiles, and saved the lord's life as a result, but since he left his lord's side, he was dishonored and expelled from the clan. He questions Itto whether he had done the wrong thing, and whether being a samurai means to fight and live, or to simply never leave the master's side and die. Itto replied that he would have done the same. "I am glad to hear that," Kanbei says, who then asks the former shogun's executioner to act as his "second" in the act of seppuku. This Itto does with honor.When asked by Kanbei what is the true "Way of the Warrior", Itto replies that it is neither to simply live nor die, but to live through death.As Itto walks away, pushing Daigoro and the baby cart, Torizo begins to runs after him, but is stopped by her men. They implore her not to go to him, saying he is not human, but a monster.

Question: what time period does the action of the movie take place?
Answer: Edo period