def _raise_or_return(target_type):
        """Depending on the value of raise_unknown, either raise an error or
        return 'unknown'.
        """
        if raise_unknown and target_type == "unknown":
            input = input_name if input_name else "data"
            raise ValueError(f"Unknown label type for {input}: {y!r}")
        else:
            return target_type
Depending on the value of raise_unknown, either raise an error or
        return 'unknown'.
        
keras/src/wrappers/fixes.py