Such acts can be get converted into criminal acts such as in this case, where a woman was apparently attacked and she fought back and inflicted deadly harm on the attacker. At this point, she would most likely have got away with either an acquittal or reduced sentences, but after this, she went ahead and hid the body and did not inform the police about what has happened - which would most probably lead to charges against her for these acts. One can sympathize with her for the self-defense, but the law does not allow her to not inform the law enforcement agencies about what has happened (link to article):
Rita told the police she hacked Krishna with an axe after he tried to rape her and her daughter in their house on April 4. “After he fell on his back, I chopped off his private parts as I thought he might survive the attack and retaliate,” she said. Krishna, however, did not survive the blows. Rita called seven women, her friends, and they buried the body in the crematorium.