code: def guessNumber(self, n):
      """
      :type n: int
      :rtype: int
      """
      # binary search
      begin, end = 1, n
      while begin <= end:
          mid = (begin + end) / 2
          res = guess(mid)
          if res == 0:
              return mid
          elif res > 0:
              begin = mid + 1
          else:
              end = mid - 1
  
label_desc: Use image node_id 1 for calling the Solution obj's underlying member method code with example usage: obj.guessNumber(n) and returns: mid