class_docstr: Test cases for common functionality.
class_docstr_tok: ["Test","cases","for","common","functionality","."]
docstr: Checks coefficients returned by chebyshev_series are correct
docstr_tok: ["Checks","coefficients","returned","by","chebyshev_series","are","correct"]
code: def test_chebyshev_series(self) -> None:
      """Checks coefficients returned by chebyshev_series are correct"""
      for width, terms in [(6, 10), (6, 20)]:
          result = chebyshev_series(torch.tanh, width, terms)
          # check shape
          self.assertTrue(result.shape == torch.Size([terms]))
          # check terms
          self.assertTrue(result[0] < 1e-4)
          self.assertTrue(
              torch.isclose(result[-1], torch.tensor(3.5e-2), atol=1e-1)
          )
  
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 4 for calling the TestCommon obj's underlying member method code with example usage: obj.test_chebyshev_series() without return types