comefrom: <doocs>0757.Set Intersection Size At Least Two_1.py
code: def intersectionSizeTwo( intervals: List[List[int]]) -> int:
      intervals.sort(key=lambda x: (x[1], -x[0]))
      s = e = -1
      ans = 0
      for a, b in intervals:
          if a <= s:
              continue
          if a > e:
              ans += 2
              s, e = b - 1, b
          else:
              ans += 1
              s, e = e, b
      return ans
masked: def sample_funcname ( var_0 : List [ List [ int ] ] ) -> int :
      var_0.sort ( var_1 = lambda var_2 : ( var_2 [ 1 ] , - var_2 [ 0 ] ) )
      var_4 = var_3 = - 1
      var_5 = 0
      for var_6 , var_7 in var_0 :
          if var_6 <= var_4 :
              continue
          if var_6 > var_3 :
              var_5 += 2
              var_4 , var_3 = var_7 - 1 , var_7
          else :
              var_5 += 1
              var_4 , var_3 = var_3 , var_7
      return var_5
  