code: def test_rescale_torch_tensor(self) -> None:
      rows, cols = 3, 5
      original_tensor = torch.randint(
          low=10, high=40, size=(rows, cols)
      ).float()
      prev_max_tensor = torch.ones(1, 5) * 40.0
      prev_min_tensor = torch.ones(1, 5) * 10.0
      new_min_tensor = torch.ones(1, 5) * -1.0
      new_max_tensor = torch.ones(1, 5).float()
  
      print("Original tensor: ", original_tensor)
      rescaled_tensor = rescale_torch_tensor(
          original_tensor,
          new_min_tensor,
          new_max_tensor,
          prev_min_tensor,
          prev_max_tensor,
      )
      print("Rescaled tensor: ", rescaled_tensor)
      reconstructed_original_tensor = rescale_torch_tensor(
          rescaled_tensor,
          prev_min_tensor,
          prev_max_tensor,
          new_min_tensor,
          new_max_tensor,
      )
      print(
          "Reconstructed Original tensor: ",
          reconstructed_original_tensor,
      )
  
      comparison_tensor = torch.eq(
          original_tensor, reconstructed_original_tensor
      )
      self.assertTrue(torch.sum(comparison_tensor), rows * cols)
  
file_path: ReAgent/reagent/test/base/test_utils.py
imports: import unittest
  import numpy.testing
  import torch
  from reagent.core.torch_utils import masked_softmax, reorder_data_kjt, rescale_torch_tensor, shift_kjt_by_one, split_sequence_keyed_jagged_tensor
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor
label_desc: Use image node_id 1 for calling the TestUtils obj's underlying member method code with example usage: obj.test_rescale_torch_tensor() without return types