code: def testVertexNameIndexingBytes(self):
      g = Graph.Famous("bull")
      g.vs["name"] = [b"foo", b"bar", b"baz", b"fred", b"thud"]
      self.assertTrue(g.degree(b"bar") == 3)
      self.assertTrue(g.degree([b"bar", b"fred", 0]) == [3, 1, 2])
      g.vs[2]["name"] = b"quack"
      self.assertRaises(ValueError, g.degree, b"baz")
      self.assertTrue(g.degree(b"quack") == 3)
      del g.vs["name"]
      self.assertRaises(ValueError, g.degree, [b"bar", b"thud", 0])
  
imports: import unittest
  from igraph import Graph
label_desc: Use image node_id 7 for calling the AttributeTests obj's underlying member method code with example usage: obj.testVertexNameIndexingBytes() without return types