input: Write a python function to scrape headings and their subsequent text from a webpage.
  assert scrape_headings('http://example.com/test1') == {'Heading1': 'Text1', 'Heading2': 'Text2'}
  assert scrape_headings('http://example.com/test2') == {'Title1': 'Content1', 'Title2': 'Content2'}
  assert scrape_headings('http://example.com/test3') == {'Main Header': 'Main Content', 'Sub Header': 'Sub Content'}
output: def scrape_headings(url):
      import requests
      from bs4 import BeautifulSoup
      
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
      
      headings = {}
      for tag in soup.find_all(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']):
          next_elem = tag.find_next_sibling()
          while next_elem and next_elem.name not in ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']:
              if next_elem.name:
                  headings[tag.get_text(strip=True)] = next_elem.get_text(strip=True)
                  break
              next_elem = next_elem.find_next_sibling()
      
      return headings