code: def rotate_array_1(arr, k, right=True):
      n = len(arr)
      right %= n
  
      # going right for K places is same like going left for N-K places
      if right:
          k = n - k
  
      # the shortest way to swap 2 parts of the array
      return arr[k:] + arr[:k]
  
label_desc: Use image node_id 1 for calling a global function with example usage: rotate_array_1(arr, k, right) and returns: unknown