code: def write(self, device=None, char=0, bs=None, count=None):
          
          volume = self.get_volume(device)
          block_size = bs or BLOCK_SIZE
  
          # Calculate the number of blocks that are in the volume
          count = count or (volume['size'] / block_size)
  
          data = "".join([chr(int(char)) for i in range(0, block_size)])
  
          print("Writing: '%c'" % data[0])
          total = 0
          with directio.open(volume['path'], buffered=block_size) as file:
              for i in range(0, count):
                  self.dot()
                  total += file.write(data)
          print("\nWrote: ", total)
          return 0
docs: Using DIRECT_O write a character in 4k chunks to a specified block
          device (Without any optional arguments will write NULL's to the
          entire device)