code: def test_invert(self):
      # get random bitstring
      length = 10
      bitstring = self.random_bitstring(10)
  
      # get inverse
      mask = BitMask.from_bin(bitstring)
      mask.invert(length)
      inverted = mask.to_bin()
  
      # remove 0b
      inverted = inverted[2:]
      bitstring = bitstring[2:]
      for i in range(min(len(bitstring), len(inverted))):
          if bitstring[-i - 1] == "0":
              self.assertEqual(inverted[-i - 1], "1")
          else:
              self.assertEqual(inverted[-i - 1], "0")
  
imports: import unittest
  from copy import deepcopy
  from random import randint, random, seed
  from lightly.api.bitmask import BitMask
label_desc: Use image node_id 18 for calling the TestBitMask obj's underlying member method code with example usage: obj.test_invert() without return types