input: def compress_sequence(nums):
      """This function compresses a given data sequence by grouping consecutive numbers which have the same sign or are both zero. It returns a list of lists where each sublist contains consecutive numbers with the same sign or zeros.
  
      Example:
      >>> compress_sequence([9, -2, 6, 0, -7])
      [[9], [-2], [6, 0], [-7]]
      """
output:     result = []
      current_group = [nums[0]]
      
      for num in nums[1:]:
          if (num >= 0 and current_group[-1] >= 0) or (num < 0 and current_group[-1] < 0):
              current_group.append(num)
          else:
              result.append(current_group)
              current_group = [num]
      
      result.append(current_group)
      return result