parsePetNamePath = petNamePath => {
    if (!Array.isArray(petNamePath) || petNamePath.length !== 1) {
      throw new Error(`Unexpected pet name path ${q(petNamePath)}`);
    }
    return petNamePath[0];
  }
We only support paths of length 1.
@param {Array<string>} petNamePath