code: function getTypesFrom_(block, name) {
    var typeBlock = block.getInputTargetBlock(name);
    var types;
    if (!typeBlock || typeBlock.disabled) {
      types = [];
    } else if (typeBlock.type == 'type_other') {
      types = [escapeString(typeBlock.getFieldValue('TYPE'))];
    } else if (typeBlock.type == 'type_group') {
      types = [];
      for (var n = 0; n < typeBlock.typeCount_; n++) {
        types = types.concat(getTypesFrom_(typeBlock, 'TYPE' + n));
      }
      // Remove duplicates.
      var hash = Object.create(null);
      for (var n = types.length - 1; n >= 0; n--) {
        if (hash[types[n]]) {
          types.splice(n, 1);
        }
        hash[types[n]] = true;
      }
    } else {
      types = [escapeString(typeBlock.valueType)];
    }
    return types;
  }
docs: Fetch the type(s) defined in the given input.
  @param {!Blockly.Block} block Block with input.
  @param {string} name Name of the input.
  @return {!Array.<string>} List of types.
  @private