def removeprefix(x, prefix):
    """Backport of `removeprefix` from PEP-616 (Python 3.9+)"""

    if len(prefix) > 0 and x.startswith(prefix):
        return x[len(prefix) :]
    else:
        return x
Backport of `removeprefix` from PEP-616 (Python 3.9+)
keras/src/utils/python_utils.py