code: async def init(
          self,
          *,
          advertise_addr: str = None,
          listen_addr: str = "0.0.0.0:2377",
          force_new_cluster: bool = False,
          swarm_spec: Mapping = None
      ) -> str:
          
  
          data = {
              "AdvertiseAddr": advertise_addr,
              "ListenAddr": listen_addr,
              "ForceNewCluster": force_new_cluster,
              "Spec": swarm_spec,
          }
  
          response = await self.docker._query_json("swarm/init", method="POST", data=data)
  
          return response
docs: Initialize a new swarm.
  
          Args:
              ListenAddr: listen address used for inter-manager communication
              AdvertiseAddr: address advertised to other nodes.
              ForceNewCluster: Force creation of a new swarm.
              SwarmSpec: User modifiable swarm configuration.
  
          Returns:
              id of the swarm node