code: async def add_local_charm_dir(self, charm_dir, series):
          
          fh = tempfile.NamedTemporaryFile()
          CharmArchiveGenerator(charm_dir).make_archive(fh.name)
          with fh:
              func = partial(
                  self.add_local_charm, fh, series, os.stat(fh.name).st_size)
              charm_url = await self._connector.loop.run_in_executor(None, func)
  
          log.debug('Uploaded local charm: %s -> %s', charm_dir, charm_url)
          return charm_url
docs: Upload a local charm to the model.
  
          This will automatically generate an archive from
          the charm dir.
  
          :param charm_dir: Path to the charm directory
          :param series: Charm series