code: async def _deploy(self, charm_url, application, series, config,
                        constraints, endpoint_bindings, resources, storage,
                        channel=None, num_units=None, placement=None,
                        devices=None):
          
          log.info('Deploying %s', charm_url)
  
          # stringify all config values for API, and convert to YAML
          config = {k: str(v) for k, v in config.items()}
          config = yaml.dump({application: config},
                             default_flow_style=False)
  
          app_facade = client.ApplicationFacade.from_connection(
              self.connection())
  
          app = client.ApplicationDeploy(
              charm_url=charm_url,
              application=application,
              series=series,
              channel=channel,
              config_yaml=config,
              constraints=parse_constraints(constraints),
              endpoint_bindings=endpoint_bindings,
              num_units=num_units,
              resources=resources,
              storage=storage,
              placement=placement,
              devices=devices,
          )
          result = await app_facade.Deploy([app])
          errors = [r.error.message for r in result.results if r.error]
          if errors:
              raise JujuError('\n'.join(errors))
          return await self._wait_for_new('application', application)
docs: Logic shared between `Model.deploy` and `BundleHandler.deploy`.