code: def binary_search(dp, target):
      l = 0
      r = len(dp) - 1
  
      while l <= r:
          mid = l + (r - l) // 2
          if dp[mid][-1] == target:
              return mid
          elif dp[mid][-1] < target:
              l = mid + 1
          else:
              r = mid - 1
  
      return l
  
label_desc: Use image node_id 3 for calling a global function with example usage: binary_search(dp, target) and returns: l, mid