code: function(opt) {
  
          opt = opt || {};
          var highlighterDef = opt.highlighter;
          var paperOpt = this.options;
  
          /*
              Expecting opt.highlighter to have the following structure:
              {
                  name: 'highlighter-name',
                  options: {
                      some: 'value'
                  }
              }
          */
          if (highlighterDef === undefined) {
  
              // check for built-in types
              var type = ['embedding', 'connecting', 'magnetAvailability', 'elementAvailability'].find(function(type) {
                  return !!opt[type];
              });
  
              highlighterDef = (type && paperOpt.highlighting[type]) || paperOpt.highlighting['default'];
          }
  
          // Do nothing if opt.highlighter is falsey.
          // This allows the case to not highlight cell(s) in certain cases.
          // For example, if you want to NOT highlight when embedding elements.
          if (!highlighterDef) return false;
  
          // Allow specifying a highlighter by name.
          if (joint.util.isString(highlighterDef)) {
              highlighterDef = {
                  name: highlighterDef
              };
          }
  
          var name = highlighterDef.name;
          var highlighter = paperOpt.highlighterNamespace[name];
  
          // Highlighter validation
          if (!highlighter) {
              throw new Error('Unknown highlighter ("' + name + '")');
          }
          if (typeof highlighter.highlight !== 'function') {
              throw new Error('Highlighter ("' + name + '") is missing required highlight() method');
          }
          if (typeof highlighter.unhighlight !== 'function') {
              throw new Error('Highlighter ("' + name + '") is missing required unhighlight() method');
          }
  
          return {
              highlighter: highlighter,
              options: highlighterDef.options || {},
              name: name
          };
      }
docs: Cell highlighting. ------------------