class_docstr: Test cases for common functionality.
class_docstr_tok: ["Test","cases","for","common","functionality","."]
code: def test_nearest_integer_division(self) -> None:
      # test without scaling:
      scale = 1
      reference = [[-26, -25, -7, -5, -4, -1, 0, 1, 3, 4, 5, 7, 25, 26]]
      tensor = torch.tensor(reference, dtype=torch.long)
      result = nearest_integer_division(tensor, scale)
      self._check(
          torch.tensor(result.tolist(), dtype=torch.long),
          torch.tensor(reference, dtype=torch.long),
          "Nearest integer division failed.",
      )
  
      # test with scaling:
      scale = 4
      reference = [[-6, -6, -2, -1, -1, 0, 0, 0, 1, 1, 1, 2, 6, 6]]
      result = nearest_integer_division(tensor, scale)
      self._check(
          torch.tensor(result.tolist(), dtype=torch.long),
          torch.tensor(reference, dtype=torch.long),
          "Nearest integer division failed.",
      )
  
file_path: CrypTen/test/test_common.py
imports: import sys
  import unittest
  import crypten
  import torch
  from crypten.common.util import chebyshev_series
  from crypten.config import cfg
  from crypten.encoder import FixedPointEncoder, nearest_integer_division
label_desc: Use image node_id 3 for calling the TestCommon obj's underlying member method code with example usage: obj.test_nearest_integer_division() without return types