code: def _bitflip(bs):
      # Return bytestring with all its bits flipped.
      return b"".join(
          struct.pack("B", 0xFF ^ struct.unpack_from("B", bs, i)[0])
          for i in range(len(bs))
      )
  
imports: import gzip
  import io
  import struct
  from unittest import mock
  from werkzeug import test
  from werkzeug import wrappers
  from tensorboard import test
  from tensorboard.backend import http_util
label_desc: Use image node_id 3 for calling a global function with example usage: _bitflip(bs) and returns: bytes