Bored Hatamoto (1930)
Bored Hatamoto: The Imposter

Overview
Around the Genroku era, there was a man named Saotome Shusui-no-Suke, nephew to the senior councilor Matsudaira Sakon Shogen. He was commonly known as the Bored Samurai of the Hatamoto rank. Just as he was engulfed in boredom, Tokugawa Jo-Kaibo, claiming to be the Shogun's illegitimate child, made a grand entrance into Edo. At the behest of Sakon Shogen, Shusui-no-Suke was tasked to investigate Jo-Kaibo's background and had his young page Kyoya disguise as a woman to infiltrate Jo-Kaibo's gun mansion.
Similar
The Hidden Fortress (1958)
Seven Samurai (1954)
The Loyal 47 Ronin (1958)
Kubi (2023)
Edo Purebreed (1961)
The Last Samurai (2003)
Throne of Blood (1957)
The Yagyu Conspiracy (2008)
Bakumatsu seishun graffiti: Ronin Sakamoto Ryoma (1986)
One-Eyed Wolf (1959)
Baian the Assassin (1981)
Ten Duels of Young Shingo: Chapter 2 (1982)
Zatoichi (2003)
Duel of Blood and Sand (1963)
Sasaki Kojiro (1957)
Case of the Hidden Coin (1959)
Date Masamune the One-Eyed Dragon (1942)
Iemitsu, Hikoza and Isshin Tasuke - A National Crisis: Edo Castle in Danger (1989)
Kagemusha (1980)
Sukiyaki Western Django (2007)