function formatLocation(apiDescriptionLocation, annotationLocation) {
  if (!annotationLocation) {
    return apiDescriptionLocation;
  }

  const [[startLine, startColumn], [endLine, endColumn]] = annotationLocation;
  const editorLink = `${apiDescriptionLocation}:${startLine}`;
  const from = `line ${startLine} column ${startColumn}`;

  if (startLine === endLine && startColumn === endColumn) {
    return `${editorLink} (${from})`;
  }

  const to =
    startLine === endLine
      ? `column ${endColumn}`
      : `line ${endLine} column ${endColumn}`;
  return `${editorLink} (from ${from} to ${to})`;
}
Formats given location data as something user can understand

@param {string} apiDescriptionLocation API description location name
@param {array} annotationLocation See 'dredd-transactions' docs