input: def compress_sequence(nums):
      """Compress a given data sequence based on the sign of adjacent elements.
      If two adjacent elements have the same sign (both positive or both negative), 
      they belong to the same grouping. You should return a list of lists where 
      each inner list represents a group of consecutive elements with the same sign.
  
      >>> compress_sequence([9, -2, 6, 0, -7])
      [[9], [-2], [6, 0], [-7]]
      """
output:     result = []
      current_group = [nums[0]]
      
      for i in range(1, len(nums)):
          if (nums[i] >= 0 and nums[i-1] >= 0) or (nums[i] < 0 and nums[i-1] < 0):
              current_group.append(nums[i])
          else:
              result.append(current_group)
              current_group = [nums[i]]
      
      result.append(current_group)
      return result