code: def binary_search(array, query):
      """
      Worst-case Complexity: O(log(n))
  
      reference: https://en.wikipedia.org/wiki/Binary_search_algorithm
      """
  
      low, high = 0, len(array) - 1
      while low <= high:
          mid = (high + low) // 2
          val = array[mid]
          if val == query:
              return mid
  
          if val < query:
              low = mid + 1
          else:
              high = mid - 1
      return None
  
label_desc: Use image node_id 1 for calling a global function with example usage: binary_search(array, query) and returns: None, mid