code: def _check_and_flip(arr):
      
      if hasattr(arr, 'ndim'):
          if arr.ndim >= 2:
              return arr.T
          else:
              return arr
      elif not is_string_like(arr) and iterable(arr):
          return tuple(_check_and_flip(a) for a in arr)
      else:
          return arr
docs: Transpose array or list of arrays if they are 2D.