function getURLArtifactFromDevtoolsLog(devtoolsLog) {
  /** @type {string|undefined} */
  let requestedUrl;
  /** @type {string|undefined} */
  let mainDocumentUrl;
  for (const event of devtoolsLog) {
    if (event.method === 'Page.frameNavigated' && !event.params.frame.parentId) {
      const {url} = event.params.frame;
      // Only set requestedUrl on the first main frame navigation.
      if (!requestedUrl) requestedUrl = url;
      mainDocumentUrl = url;
    }
  }
  const networkRecords = NetworkRecorder.recordsFromLogs(devtoolsLog);
  let initialRequest = networkRecords.find(r => r.url === requestedUrl);
  while (initialRequest?.redirectSource) {
    initialRequest = initialRequest.redirectSource;
    requestedUrl = initialRequest.url;
  }
  if (!requestedUrl || !mainDocumentUrl) throw new Error('No main frame navigations found');

  return {
    requestedUrl,
    mainDocumentUrl,
    finalDisplayedUrl: mainDocumentUrl,
  };
}
This has a slightly different, less strict implementation than `PageDependencyGraph`.
It's a convenience function so we don't have to dig through the log and determine the URL artifact manually.

@param {LH.DevtoolsLog} devtoolsLog
@return {LH.Artifacts['URL']}