input: defcompress_sequence(nums): """Compress a given data sequence by grouping consecutive numbers with the same sign (positive or negative). Consecutive zeros will also be grouped together. The input is a list of integers, and the output is a list of lists where each sublist contains consecutive numbers with the same sign.
  
  Example:
  >>> compress_sequence([9, -2, 6, 0, -7])
  [[9], [-2], [6], [0], [-7]]
  """
  
  output = []
  temp = [nums[0]]
  
  for i in range(1, len(nums)):
      if nums[i-1] * nums[i] >= 0:
          temp.append(nums[i])
      else:
          output.append(temp)
          temp = [nums[i]]
  output.append(temp)
  
  return output
output:     
      output = []
      temp = [nums[0]]
  
      for i in range(1, len(nums)):
          if nums[i-1] * nums[i] >= 0:
              temp.append(nums[i])
          else:
              output.append(temp)
              temp = [nums[i]]
      output.append(temp)
  
      return output
  