In a fanfic, Hermione might start by trying to use her knowledge of transfiguration or charms to solve the problem. For example, she could try to transfigure a nearby object into a makeshift toilet. Or she could use a charm to hold her bladder for a longer time while she searches for an appropriate place. And if she's in a tight spot, she might even use her wits to convince someone to let her use their private facilities by making a very logical and persuasive argument.
Hermione is a very resourceful character. She would likely first try to hold it in while she figures out a proper solution. If she's in a public place like Hogwarts, she might look for a private corner or an empty classroom. She could also use her magic to create a temporary privacy shield if needed.
Hermione might also think about the reason why she's locked in. Is it a trap set by an enemy? If so, she'd start to plan how to outwit them once she gets out. She could use the time she's locked in to prepare herself mentally and magically. She might even try to find a way to turn the situation to her advantage, like using the room's contents to create a new spell or potion that could help her later.
Maybe Hermione is on a long and arduous adventure in the Forbidden Forest. She's been walking for hours and there's no proper place to relieve herself. She has to pee but she's also worried about being attacked by some dangerous creatures. So she has to keep looking for a safe spot while constantly being distracted by the growing need to pee.
Together, they would rely on their friendship and new - found love. They'd support each other through the tough times. Harry would be the one to face any physical threats while Hermione would handle the more intellectual aspects like making sure they have a proper plan for when the baby is born. They'd also have to deal with their own insecurities and fears, but their bond would help them get through it all.
One plot idea could be that Hermione is in the middle of an important exam at Hogwarts but she suddenly has an urgent need to pee. She tries to hold it in while still focusing on answering the questions. Another could be during a long adventure in the Forbidden Forest, she has to find a private and safe place to relieve herself. Or perhaps she's in a wizarding library researching and the need to pee becomes a comical and desperate situation as she doesn't want to leave her precious books.
In these fanfictions, Hermione's character development often focuses on her growth in the face of adversity. The experiments force her to become more resourceful and self - reliant. She has to use her intelligence in new and extreme ways to survive. For example, she might figure out ways to escape or counteract the effects of the experiments.
To make it family - friendly, focus on the comical aspects. For example, Hermione could be in a situation where she's trying to hold it while chasing a mischievous magical creature that's causing chaos. The story could show her determination not to let the creature get away while also dealing with her need to pee in a humorous way. There could be no vulgar language or inappropriate situations, just a fun adventure with a relatable problem.
Often, in such fanfiction, they become more resilient. For example, if they are physically abused by Death Eaters, Harry might become more determined to fight against Voldemort and Hermione might use her intelligence to find ways to protect themselves and others. Their experiences of abuse shape them into stronger characters.
In most 'hermione and theo fanfic', Hermione is often depicted as highly intelligent, strong - willed, and very passionate about knowledge and justice. Theo, on the other hand, is usually shown as a complex character. He may be brooding, having a troubled past from his Slytherin upbringing, but also having a hidden depth of kindness and a desire for something more than the typical Slytherin values.
In Hermione fanfics, the age of characters can play various roles. Sometimes it might be kept in line with the original series, where Hermione starts as a young witch at Hogwarts, around 11 years old. As the story progresses in fanfics, she can age gracefully and reach her teenage years and then adulthood, which can be used to explore different relationships and storylines.
Perhaps the author has a different interpretation of Hermione's character. In the original series, she has great friends, but in this fanfic, the author might think that there were some underlying aspects of her personality that could lead to her being ostracized. It could be related to her intelligence or her sometimes bossy nature, which the author may have exaggerated to make her seem friendless.