code: def get_mapping(self, index, doc_type=None):
          
          mapping = self.es.indices.get_mapping(index=index, doc_type=doc_type)
          return next(iter(mapping.values()))
docs: Get mapping for index.
  
          :param index: index name