def removesuffix(self: str, suffix: str) -> str:
    """ Backport of `removesuffix` from PEP-616 (Python 3.9+) """

    if self.endswith(suffix):
        return self[:-len(suffix)]
    else:
        return self