import codecs


def get_incremental_decoder(encoding: str, errors: str = 'strict') -> codecs.IncrementalDecoder:
    """Convenience function to create an incremental decoder for the given
    encoding and error handler."""
    return codecs.getincrementaldecoder(encoding)(errors)