comefrom: <qiyuangong>080_Remove_Duplicates_from_Sorted_Array_II_1.py
code: def removeDuplicates( nums):
      if nums is None:
          return 0
      length = len(nums)
      result = 0
      i = j = 0
      while i < length:
          j = i
          while j < length:
              if nums[j] != nums[i]:
                  break
              j += 1
          if j-i > 2:
              length -= j-i-2
              for k in range(j-i-2):
                  del nums[i]
              result += 2
              j = i+2
          else:
              result += (j-i)
          i = j
      return result
masked: def sample_funcname ( var_0 ) :
      if var_0 is None :
          return 0
      var_1 = len ( var_0 )
      var_2 = 0
      var_4 = var_3 = 0
      while var_4 < var_1 :
          var_3 = var_4
          while var_3 < var_1 :
              if var_0 [ var_3 ] != var_0 [ var_4 ] :
                  break
              var_3 += 1
          if var_3 - var_4 > 2 :
              var_1 -= var_3 - var_4 - 2
              for var_5 in range ( var_3 - var_4 - 2 ) :
                  del var_0 [ var_4 ]
              var_2 += 2
              var_3 = var_4 + 2
          else :
              var_2 += ( var_3 - var_4 )
          var_4 = var_3
      return var_2
  