def value_transform(x: torch.Tensor, eps: float = 1e-2) -> torch.Tensor:
    """
    **Overview**:
        A function to reduce the scale of the action-value function. For extensive reading, please refer to: Achieving Consistent Performance on Atari <link https://arxiv.org/abs/1805.11593 link>
        Given the input tensor ``x`` , this function will return the normalized tensor.
        The argument ``eps`` is a hyper-parameter that controls the additive regularization term to ensure the corresponding inverse operation is Lipschitz continuous.
    """
    # Core implementation.
    # The formula of the normalization is: $$h(x) = sign(x)(\sqrt{(|x|+1)} - 1) + \epsilon * x$$
    return torch.sign(x) * (torch.sqrt(torch.abs(x) + 1) - 1) + eps * x

    **Overview**:
        A function to reduce the scale of the action-value function. For extensive reading, please refer to: Achieving Consistent Performance on Atari <link https://arxiv.org/abs/1805.11593 link>
        Given the input tensor ``x`` , this function will return the normalized tensor.
        The argument ``eps`` is a hyper-parameter that controls the additive regularization term to ensure the corresponding inverse operation is Lipschitz continuous.
    
chapter4_reward/value_rescale.py