async function checkLatestTransferOperation() {
    const [transferJob] = await client.getTransferJob({projectId, jobName});

    if (transferJob.latestOperationName) {
      const [transferOperation] = await client.operationsClient.getOperation({
        name: transferJob.latestOperationName,
      });

      const operation = JSON.stringify(transferOperation, null, 2);

      console.log(`Latest transfer operation for '${jobName}': ${operation}`);
    } else {
      console.log(`Transfer job '${jobName}' has not ran yet.`);
    }
  }
Checks the latest transfer operation for a given transfer job.