code: def testRealizeDegreeSequence(self):
      # Test case insensitivity of options too
      g = Graph.Realize_Degree_Sequence(
          [1, 1],
          None,
          "simPLE",
          "smallest",
      )
      self.assertFalse(g.is_directed())
      self.assertTrue(g.degree() == [1, 1])
  
      # Not implemented, should fail
      self.assertRaises(
          NotImplementedError,
          Graph.Realize_Degree_Sequence,
          [1, 1],
          None,
          "loops",
          "largest",
      )
  
      g = Graph.Realize_Degree_Sequence(
          [1, 1],
          None,
          "all",
          "largest",
      )
      self.assertFalse(g.is_directed())
      self.assertTrue(g.degree() == [1, 1])
  
      g = Graph.Realize_Degree_Sequence(
          [1, 1],
          None,
          "multi",
          "index",
      )
      self.assertFalse(g.is_directed())
      self.assertTrue(g.degree() == [1, 1])
  
      g = Graph.Realize_Degree_Sequence(
          [1, 1],
          [1, 1],
          "simple",
          "largest",
      )
      self.assertTrue(g.is_directed())
      self.assertTrue(g.indegree() == [1, 1])
      self.assertTrue(g.outdegree() == [1, 1])
  
      # Not implemented, should fail
      self.assertRaises(
          NotImplementedError,
          Graph.Realize_Degree_Sequence,
          [1, 1],
          [1, 1],
          "multi",
          "largest",
      )
  
      self.assertRaises(
          ValueError,
          Graph.Realize_Degree_Sequence,
          [1, 1],
          [1, 1],
          "should_fail",
          "index",
      )
      self.assertRaises(
          ValueError,
          Graph.Realize_Degree_Sequence,
          [1, 1],
          [1, 1],
          "multi",
          "should_fail",
      )
  
      # Degree sequence of Zachary karate club, using optional arguments
      zachary = Graph.Famous("zachary")
      degrees = zachary.degree()
      g = Graph.Realize_Degree_Sequence(degrees)
      self.assertFalse(g.is_directed())
      self.assertTrue(g.degree() == degrees)
  
imports: import unittest
  from igraph import Graph, InternalError
label_desc: Use image node_id 8 for calling the GeneratorTests obj's underlying member method code with example usage: obj.testRealizeDegreeSequence() without return types