docs: def get_metric_index(self, data_source):
          """
          This function will return the elasticsearch index for a corresponding
          data source. It chooses in between the default and the user inputed
          es indices and returns the user inputed one if it is available.
  
          :param data_source: the data source for which the index has to be returned
          :returns: an elasticsearch index name
          """
  
          if data_source in self.index_dict:
              index = self.index_dict[data_source]
          else:
              index = self.class2index[self.ds2class[data_source]]
          return Index(index_name=index)