code: def tape_gen(self, data):
          
  
          # FIXME
          data = str(data).encode()
  
          # Derive a key from data
          hmac_obj = hmac.HMAC(self.key, digestmod=hashlib.sha256)
          hmac_obj.update(data)
          assert hmac_obj.digest_size == 32
          digest = hmac_obj.digest()
  
          # Use AES in the CTR mode to generate a pseudo-random bit string
          aes_algo = algorithms.AES(digest)
          aes_cipher = Cipher(aes_algo, mode=CTR(b'\x00' * 16), backend=default_backend())
          encryptor = aes_cipher.encryptor()
  
          while True:
              encrypted_bytes = encryptor.update(b'\x00' * 16)
              # Convert the data to a list of bits
              bits = util.str_to_bitstring(encrypted_bytes)
              for bit in bits:
                  yield bit
docs: Return a bit string, generated from the given data string