input: def compress_sequence(nums):
      """
      Compress a given data sequence by grouping consecutive elements with the same sign.
  
      >>> compress_sequence([9, -2, 6, 0, -7])
      [[9], [-2], [6, 0], [-7]]
      """
output:     result = []
      current_group = []
      for num in nums:
          if not current_group or (num >= 0) == (current_group[-1] >= 0):
              current_group.append(num)
          else:
              result.append(current_group)
              current_group = [num]
      if current_group:
          result.append(current_group)
      return result