parameters: (self, cols)
return_statement: return num_errors
docstring: Check that the header has the correct items and set self.cols.
  
          :param cols: The list of column headers to be validated
  
          :return the number of errors found.
docstring_summary: Check that the header has the correct items and set self.cols.
docstring_tokens: Check that the header has the correct items and set self . cols .
function: def checkHeader(self, cols):
  
          """Check that the header has the correct items and set self.cols.
  
          :param cols: The list of column headers to be validated
  
          :return the number of errors found.
          """
  
          num_errors = 0
  
          # TODO check for end-of-line whitespace
  
          self.cols = cols
          self.numCols = len(self.cols)
  
          num_errors += self._checkRepeatedColumns()
  
          if self.REQUIRE_COLUMN_ORDER:
              num_errors += self._checkOrderedRequiredColumns()
          else:
              num_errors += self._checkUnorderedRequiredColumns()
  
          return num_errors
function_tokens: def checkHeader ( self , cols ) : num_errors = 0 # TODO check for end-of-line whitespace self . cols = cols self . numCols = len ( self . cols ) num_errors += self . _checkRepeatedColumns ( ) if self . REQUIRE_COLUMN_ORDER : num_errors += self . _checkOrderedRequiredColumns ( ) else : num_errors += self . _checkUnorderedRequiredColumns ( ) return num_errors