code: def rotate(prefixes, hosts, **kwargs):
      
  
      rotator = Rotator(pyes.ES(hosts), **kwargs)
  
      for prefix in prefixes:
          rotator.rotate(prefix)
docs: Rotates a set of daily indices by updating a "-current" alias to point to
      a (newly-created) index for today. This should probably be called from a
      daily cronjob just after midnight.