in neuron-explainer/neuron_explainer/explanations/explainer.py [0:0]
def _remove_final_period(text: str) -> str:
"""Strip a final period or period-space from a string."""
if text.endswith("."):
return text[:-1]
elif text.endswith(". "):
return text[:-2]
return text