input: Write a function to compress a given data sequence by grouping consecutive numbers with the same sign or zero. If a sequence contains consecutive numbers with the same sign, they should be grouped together. Otherwise, a new group should be started. The function should return a list of lists where each sublist represents a group of consecutive similar elements.
  
  assert compress_sequence([9, -2, 6, 0, -7])==[[9], [-2], [6], [0], [-7]]
output: def compress_sequence(data):
      if not data:
          return []
      result = [[data[0]]]
      for num in data[1:]:
          if (num >= 0 and result[-1][0] >= 0) or (num < 0 and result[-1][0] < 0):
              result[-1].append(num)
          else:
              result.append([num])
      return result