code: async def deploy(
              self, *, user_data: typing.Union[bytes, str] = None,
              distro_series: str = None, hwe_kernel: str = None,
              comment: str = None, wait: bool = False, wait_interval: int = 5):
          
          params = {"system_id": self.system_id}
          if user_data is not None:
              if isinstance(user_data, bytes):
                  params["user_data"] = base64.encodebytes(user_data)
              else:
                  # Already base-64 encoded. Convert to a byte string in
                  # preparation for multipart assembly.
                  params["user_data"] = user_data.encode("ascii")
          if distro_series is not None:
              params["distro_series"] = distro_series
          if hwe_kernel is not None:
              params["hwe_kernel"] = hwe_kernel
          if comment is not None:
              params["comment"] = comment
          self._data = await self._handler.deploy(**params)
          if not wait:
              return self
          else:
              # Wait for the machine to be fully deployed
              while self.status == NodeStatus.DEPLOYING:
                  await asyncio.sleep(wait_interval)
                  self._data = await self._handler.read(system_id=self.system_id)
              if self.status == NodeStatus.FAILED_DEPLOYMENT:
                  msg = "{hostname} failed to deploy.".format(
                      hostname=self.hostname
                  )
                  raise FailedDeployment(msg, self)
              return self
docs: Deploy this machine.
  
          :param user_data: User-data to provide to the machine when booting. If
              provided as a byte string, it will be base-64 encoded prior to
              transmission. If provided as a Unicode string it will be assumed
              to be already base-64 encoded.
          :param distro_series: The OS to deploy.
          :param hwe_kernel: The HWE kernel to deploy. Probably only relevant
              when deploying Ubuntu.
          :param comment: A comment for the event log.
          :param wait: If specified, wait until the deploy is complete.
          :param wait_interval: How often to poll, defaults to 5 seconds