code: def max_sliding_window(arr, k):
      qi = collections.deque()  # queue storing indexes of elements
      result = []
      for i, n in enumerate(arr):
          while qi and arr[qi[-1]] < n:
              qi.pop()
          qi.append(i)
          if qi[0] == i - k:
              qi.popleft()
          if i >= k - 1:
              result.append(arr[qi[0]])
      return result
  
label_desc: Use image node_id 1 for calling a global function with example usage: max_sliding_window(arr, k) and returns: result