input: from typing import List
  
  
  def compress_sequence(nums: List[int]) -> List[List[int]]:
      """
      Compress a given data sequence by grouping consecutive numbers that are of 
      the same sign (positive or negative) together. The compressed sequence 
      consists of lists of these consecutive numbers.
      
      >>> compress_sequence([9, -2, 6, 0, -7])
      [[9], [-2], [6, 0], [-7]]
      """
      output = []
      temp = []
  
      for i in range(1, len(nums) + 1):
          if len(temp) > 0 and (i == len(nums) or nums[i-1] * nums[i] < 0):
              temp.append(nums[i-1])
              output.append(temp)
              temp = []
          else:
              temp.append(nums[i-1])
      return output
output:     output = []
      temp = []
  
      for i in range(1, len(nums) + 1):
          if len(temp) > 0 and (i == len(nums) or nums[i-1] * nums[i] < 0):
              temp.append(nums[i-1])
              output.append(temp)
              temp = []
          else:
              temp.append(nums[i-1])
      return output