def symlog(x: torch.Tensor) -> torch.Tensor:
    """
    **Overview**:
        A function to normalize the targets. For extensive reading, please refer to: Mastering Diverse Domains through World Models <link https://arxiv.org/abs/2301.04104 link>
        Given the input tensor ``x`` , this function will return the normalized tensor.
    """
    # The formula of the normalization is: $$symlog(x) = sign(x)(\ln{|x|+1})$$
    return torch.sign(x) * (torch.log(torch.abs(x) + 1))

    **Overview**:
        A function to normalize the targets. For extensive reading, please refer to: Mastering Diverse Domains through World Models <link https://arxiv.org/abs/2301.04104 link>
        Given the input tensor ``x`` , this function will return the normalized tensor.
    
chapter4_reward/value_rescale.py