docstr: Test novelty function
docstr_tok: ["Test","novelty","function"]
code: def test_novelty(self):
      """
      Test novelty function
      """
  
      # GIVEN test_novelty metrics
      test_predicted_popularity = [
          [1198, 1270, 593, 2762, 318, 2571, 260, 1240, 296, 608],
          [1198, 1270, 593, 2762, 318, 2571, 260, 1240, 296, 608],
      ]
  
      test_pop = {
          1198: 893,
          1270: 876,
          593: 876,
          2762: 867,
          318: 864,
          2571: 863,
          260: 859,
          1240: 857,
          296: 856,
          608: 853,
      }
  
      test_users = 933  # Total unique users from notebook demo
      test_recs_per_user = 10
  
      # WHEN metrics.novelty is run
      novelty_score, _ = metrics.novelty(
          predicted=test_predicted_popularity,
          pop=test_pop,
          u=test_users,
          n=test_recs_per_user,
      )
  
      # THEN the novelty score should equal the expected value within 3 decimal places
      self.assertEqual(novelty_score, 0.10697151566593581, 3)
  
file_path: recmetrics/tests/test_metrics.py
imports: import unittest
  from unittest import mock
  import pandas
  from recmetrics import metrics
label_desc: Use image node_id 1 for calling the TestMetrics obj's underlying member method code with example usage: obj.test_novelty() without return types