def has_none_shape(x):
        """Check for if a `KerasTensor` has dynamic shape."""
        if isinstance(x, KerasTensor):
            return None in x.shape
        return False
Check for if a `KerasTensor` has dynamic shape.
keras/src/backend/torch/core.py