input: def compress_sequence(nums):
      """
      Compresses a given data sequence by grouping consecutive numbers with the same sign.
      If a number is positive, it groups with other positive numbers, and if negative, it groups with other negative numbers.
      Zeroes are grouped with the next number of the same sign.
      The output is a list of lists, where each sublist contains consecutive numbers of the same sign.
      
      >>> compress_sequence([9, -2, 6, 0, -7])
      [[9], [-2], [6, 0], [-7]]
      """
      output = []
      temp = []
  
      for i in range(1, len(nums)):
          if nums[i-1] * nums[i] >= 0:
              temp.append(nums[i-1])
          else:
              temp.append(nums[i-1])
              output.append(temp)
              temp = []
      temp.append(nums[i])
      output.append(temp)
  
      return output
output:     output = []
      temp = []
  
      for i in range(1, len(nums)):
          if nums[i-1] * nums[i] >= 0:
              temp.append(nums[i-1])
          else:
              temp.append(nums[i-1])
              output.append(temp)
              temp = []
      temp.append(nums[i])
      output.append(temp)
  
      return output