async function runSample(formIdToCheck) {
  const authClient = await authenticate({
    keyfilePath: CREDENTIALS_PATH,
    scopes: SCOPES,
  });

  const formsClient = forms({
    version: 'v1',
    auth: authClient,
  });

  try {
    const res = await formsClient.forms.get({
      formId: formIdToCheck,
    });

    const formTitle = res.data.info.title;

    // If 'publishSettings' field exists (even if empty), it supports the new
    // publishing model.
    if (res.data && res.data.publishSettings !== undefined) {
      console.log(`Form '${formIdToCheck}' (Title: ${
          formTitle}) is NOT a legacy form (supports publishSettings).`);
    } else {
      console.log(`Form '${formIdToCheck}' (Title: ${
          formTitle}) IS a legacy form (does not have publishSettings field).`);
    }
  } catch (err) {
    console.error(`Error getting form metadata for '${formIdToCheck}':`, err);
  }
}
Checks if the form supports publishing.

@param {string} formIdToCheck The ID of the form to check.