code: def read_exactly(self, num_bytes):
          
  
          output = b''
          remaining = num_bytes
          while remaining > 0:
              output += self.read(remaining)
              remaining = num_bytes - len(output)
  
          return output
docs: Reads exactly the specified number of bytes from the socket
  
          :param num_bytes:
              An integer - the exact number of bytes to read
  
          :return:
              A byte string of the data that was read