code: def test_recommender(self):
      recommenders = [
          "factorization_recommender",
          "ranking_factorization_recommender",
          "popularity_recommender",
          "item_content_recommender",
          "item_similarity_recommender",
      ]
      other = ["util", "create"]
  
      # Check visibility in turicreate.recommender
      actual = [x for x in dir(turicreate.recommender) if "__" not in x]
      expected = recommenders + other
      check_visible_modules(actual, expected)
  
      # For each module, check that there is a create() method.
      expected = ["create"]
  
      actual = get_visible_items(
          turicreate.recommender.factorization_recommender
      )
      assert set(actual) == set(expected + ["FactorizationRecommender"])
  
      actual = get_visible_items(
          turicreate.recommender.ranking_factorization_recommender
      )
      assert set(actual) == set(
          expected + ["RankingFactorizationRecommender"]
      )
  
      actual = get_visible_items(
          turicreate.recommender.item_similarity_recommender
      )
      assert set(actual) == set(
          expected + ["ItemSimilarityRecommender"]
      )
  
      actual = get_visible_items(
          turicreate.recommender.item_content_recommender
      )
      assert set(actual) == set(expected + ["ItemContentRecommender"])
  
      actual = get_visible_items(
          turicreate.recommender.popularity_recommender
      )
      assert set(actual) == set(expected + ["PopularityRecommender"])
  
      actual = get_visible_items(turicreate.recommender.util)
      expected = [
          "random_split_by_user",
          "RecommenderViews",
          "precision_recall_by_user",
          "compare_models",
      ]
      check_visible_modules(actual, expected)
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import turicreate
label_desc: Use image node_id 2 for calling the ModuleVisibilityTests obj's underlying member method code with example usage: obj.test_recommender() without return types