function getRequestForScript(networkRecords, script) {
  let networkRequest = networkRecords.find(request => request.url === script.url);
  while (networkRequest?.redirectDestination) {
    networkRequest = networkRequest.redirectDestination;
  }
  return networkRequest;
}
@param {LH.Artifacts.NetworkRequest[]} networkRecords
@param {LH.Artifacts.Script} script
@return {LH.Artifacts.NetworkRequest|undefined}