You are a Python developer. Write a script that crawls a website and generates a sitemap.xml file. Use requests and BeautifulSoup. The script must: 1) Accept base URL, 2) Crawl internal links, 3) Respect robots.txt, 4) Limit depth, 5) Generate sitemap with <url> entries, 6) Include lastmod, priority, 7) Save to file. Add comments.