code: async def addUnit(self, application, to):
          
          application = self.resolve(application)
          placement = self.resolve(to)
          if self._units_by_app.get(application):
              # enough units for this application already exist;
              # claim one, and carry on
              # NB: this should probably honor placement, but the juju client
              # doesn't, so we're not bothering, either
              unit_name = self._units_by_app[application].pop()
              log.debug('Reusing unit %s for %s', unit_name, application)
              return self.model.units[unit_name]
  
          log.debug('Adding new unit for %s%s', application,
                    ' to %s' % placement if placement else '')
          return await self.model.applications[application].add_unit(
              count=1,
              to=placement,
          )
docs: :param application string:
              Application holds the application placeholder name for which a unit
              is added.
  
          :param to string:
              To holds the optional location where to add the unit, as a
              placeholder pointing to another unit change or to a machine change.