code: def Launcher(self, config=None):
          
          class _launcher(EC2ApiClient):
              """Configurable launcher for EC2 instances. Create the Launcher
              (passing an optional dict of its attributes), set its attributes
              (as described in the RunInstances API docs), then launch().
              """
              def __init__(self, aws, config):
                  super(_launcher, self).__init__(aws)
                  self.config = config
                  self._attr = list(self.__dict__.keys()) + ['_attr']
  
              def launch(self, ami, min_count, max_count=0):
                  """Use given AMI to launch min_count instances with the
                  current configuration. Returns instance info list.
                  """
                  params = config.copy()
                  params.update(dict([i for i in self.__dict__.items()
                                      if i[0] not in self._attr]))
                  return self.call("RunInstances",
                                   ImageId=ami,
                                   MinCount=min_count,
                                   MaxCount=max_count or min_count,
                                   response_data_key="Instances",
                                   **params)
  
          if not config:
              config = {}
          return _launcher(self._aws, config)
docs: Provides a configurable launcher for EC2 instances.