code: function() {
      var OPERATORS =
          [[Blockly.Msg.LOGIC_OPERATION_AND, 'AND'],
           [Blockly.Msg.LOGIC_OPERATION_OR, 'OR']];
      this.setHelpUrl(Blockly.Msg.LOGIC_OPERATION_HELPURL);
      this.setColour(Blockly.Blocks.logic.HUE);
      this.setOutput(true, 'Boolean');
      this.appendValueInput('A')
          .setCheck('Boolean');
      this.appendValueInput('B')
          .setCheck('Boolean')
          .appendField(new Blockly.FieldDropdown(OPERATORS), 'OP');
      this.setInputsInline(true);
      // Assign 'this' to a variable for use in the tooltip closure below.
      var thisBlock = this;
      this.setTooltip(function() {
        var op = thisBlock.getFieldValue('OP');
        var TOOLTIPS = {
          'AND': Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND,
          'OR': Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR
        };
        return TOOLTIPS[op];
      });
    }
docs: Block for logical operations: 'and', 'or'.
  @this Blockly.Block