Reads the IndexTable index file of commands and templates.
    Args:
      index_file: String, file where template/command mappings reside.
    Raises:
      CliTableError: A template column was not found in the table.

def ReadIndex(self, index_file=None):
        """Reads the IndexTable index file of commands and templates.
    Args:
      index_file: String, file where template/command mappings reside.
    Raises:
      CliTableError: A template column was not found in the table.
    """

        self.index_file = index_file or self.index_file
        fullpath = os.path.join(self.template_dir, self.index_file)
        if self.index_file and fullpath not in self.INDEX:
            self.index = IndexTable(self._PreParse, self._PreCompile, fullpath)
            self.INDEX[fullpath] = self.index
        else:
            self.index = self.INDEX[fullpath]

        # Does the IndexTable have the right columns.
        if "Template" not in self.index.index.header:  # pylint: disable=E1103
            raise CliTableError("Index file does not have 'Template' column.")