keras/src/losses/losses.py/LossFunctionWrapper/from_config
class LossFunctionWrapper:    def from_config(cls, config):
        if "fn" in config:
            config = serialization_lib.deserialize_keras_object(config)
        return cls(**config)