input: Write a python function to parse a URL into its base URL and query string.
  assert parse_url("https://www.example.com/index.php?p=1&q=2") == ('https://www.example.com', '/index.php?p=1&q=2')
  assert parse_url("http://test.com/path/to/resource") == ('http://test.com', '/path/to/resource')
  assert parse_url("https://www.sample.org") == ('https://www.sample.org', '')
output: def parse_url(url):
      from urllib.parse import urlparse
      parsed_url = urlparse(url)
      base_url = f"{parsed_url.scheme}://{parsed_url.netloc}"
      query_string = parsed_url.path + (f"?{parsed_url.query}" if parsed_url.query else "")
      return base_url, query_string