'Get concrete ``LossFunction`` object for str ``loss``.'

def _get_loss_function(self, loss):

    try:
        loss_ = self.loss_functions[loss]
        (loss_class, args) = (loss_[0], loss_[1:])
        if (loss in ('huber', 'epsilon_insensitive', 'squared_epsilon_insensitive')):
            args = (self.epsilon,)
        return loss_class(*args)
    except KeyError:
        raise ValueError(('The    loss    %s    is    not    supported.    ' % loss))
