code: def get_orientation(self, si, sj):
          
          if not si or not sj:
              return 0
          # Same orientation configuration
          a = lms(si + sj)
          b = lms(sj + si)
          # Opposite orientation configuration
          c = lms(si + sj[::-1])
          d = lms(sj[::-1] + si)
          return max(a, b)[0] - max(c, d)[0]
docs: si, sj are two number series. To compute whether these two series have
          same orientation or not. We combine them in the two orientation
          configurations and compute length of the longest monotonic series.