code: def testAsymmetricPreference(self):
      g = Graph.Asymmetric_Preference(
          100, [[0, 1], [1, 0]], [[0, 1], [1, 0]]
      )
      self.assertTrue(isinstance(g, Graph))
      self.assertEqual(len(g.connected_components()), 2)
  
      g = Graph.Asymmetric_Preference(
          100, [[0, 1], [1, 0]], [[1, 0], [0, 1]], attribute="type"
      )
      types = g.vs.get_attribute_values("type")
      types1 = [i[0] for i in types]
      types2 = [i[1] for i in types]
      self.assertTrue(
          min(types1) == 0
          and max(types1) == 1
          and min(types2) == 0
          and max(types2) == 1
      )
  
      g = Graph.Asymmetric_Preference(
          100, [[0, 1], [1, 0]], [[1, 0], [0, 1]]
      )
      self.assertTrue(isinstance(g, Graph))
      self.assertEqual(len(g.connected_components()), 1)
  
file_path: python-igraph/tests/test_games.py
imports: import unittest
  from igraph import Graph, InternalError, Layout
label_desc: Use image node_id 5 for calling the GameTests obj's underlying member method code with example usage: obj.testAsymmetricPreference() without return types