code: def create_index(self, index=None, settings=None, es=None):
          
          if index is None:
              index = self.index
          if es is None:
              es = self.es
          try:
              alias = index
              index = generate_index_name(alias)
  
              args = {'index': index}
              if settings:
                  args['body'] = settings
  
              es.indices.create(**args)
              es.indices.put_alias(index, alias)
              logger.info('created index alias=%s index=%s' % (alias, index))
          except elasticsearch.TransportError:  # index exists
              pass
docs: Create new index and ignore if it exists already.