function getLinked (elem, attr) {
      if (!elem) { return null; }
      const str = elem.getAttribute(attr);
      if (!str) { return null; }

      // const m = str.match(/\(#(?<id>.+)\)/);
      // if (!m || !m.groups.id) {
      const m = str.match(/\(#(.*)\)/);
      if (!m || m.length !== 2) {
        return null;
      }
      return svgCanvas.getElem(m[1]);
      // return svgCanvas.getElem(m.groups.id);
    }
@param {Element} elem - A graphic element will have an attribute like marker-start
@param {"marker-start"|"marker-mid"|"marker-end"} attr
@returns {Element} The marker element that is linked to the graphic element