code: function buildColumn(column, defaultScope, columns){
              // note: we're not modifying the original column object. This helps to avoid unintended side affects
              var extendedCol = Object.create(column);
              var defaults = createDefaults();
              for (var prop in defaults) {
                  if (extendedCol[prop] === undefined) {
                      extendedCol[prop] = defaults[prop];
                  }
                  if(!angular.isFunction(extendedCol[prop])){
                      // wrap raw field values with "getter" functions
                      // - this is to ensure consistency with how ngTable.compile builds columns
                      // - note that the original column object is being "proxied"; this is important
                      //   as it ensure that any changes to the original object will be returned by the "getter"
                      (function(prop1){
                          var getterFn = function () {
                              return column[prop1];
                          };
                          getterFn.assign = function($scope, value){
                              column[prop1] = value;
                          };
                          extendedCol[prop1] = getterFn;
                      })(prop);
                  }
                  (function(prop1){
                      // satisfy the arguments expected by the function returned by parsedAttribute in the ngTable directive
                      var getterFn = extendedCol[prop1];
                      extendedCol[prop1] = function () {
                          var scope = arguments[0] || defaultScope;
                          var context = Object.create(scope);
                          angular.extend(context, {
                              $column: extendedCol,
                              $columns: columns
                          });
                          return getterFn.call(column, context);
                      };
                      if (getterFn.assign){
                          extendedCol[prop1].assign = getterFn.assign;
                      }
                  })(prop);
              }
              return extendedCol;
          }
docs: @ngdoc method
  @name ngTableColumn#buildColumn
  @description Creates a $column for use within a header template
  
  @param {Object} column an existing $column or simple column data object
  @param {Scope} defaultScope the $scope to supply to the $column getter methods when not supplied by caller
  @param {Array} columns a reference to the columns array to make available on the context supplied to the
  $column getter methods
  @returns {Object} a $column object