input: Write a function to compress a given data sequence by grouping contiguous elements with the same sign. If two adjacent elements are not of the same sign (one positive and one negative), they should be considered separate groups. Return the compressed sequence as a list of lists where each inner list contains contiguous elements with the same sign.
  
  def compress_sequence(nums):
      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
  
  assert compress_sequence([9, -2, 6, 0, -7]) == [[9], [-2], [6, 0], [-7]]
  assert compress_sequence([]) == []
  assert compress_sequence([1, 2, 3, -1, -2, -3]) == [[1, 2, 3], [-1, -2, -3]]
  assert compress_sequence([0, 0, 0]) == [[0, 0, 0]]
  assert compress_sequence([5, -5, 5, -5]) == [[5], [-5], [5], [-5]]
output: def compress_sequence(nums):
      output = []
      temp = []
      for i in range(len(nums)):
          if temp and (nums[i] * temp[-1] < 0):
              output.append(temp)
              temp = []
          temp.append(nums[i])
      if temp:
          output.append(temp)
      return output