code: def advertise(name, address=None, fail_if_exists=False, ttl_s=config.ADVERT_TTL_S):
      
      _start_beacon()
      address = _rpc("advertise", name, address, fail_if_exists, ttl_s)
      _services_advertised[name] = address
      return address
docs: Advertise a name at an address
      
      Start to advertise service `name` at address `address`. If
      the address is not supplied, one is constructed and this is
      returned by the function. ie this is a typical use::
      
          address = nw0.advertise("myservice")
          
      :param name: any text
      :param address: either "ip:port" or None
      :param fail_if_exists: fail if this name is already registered?
      :param ttl_s: the advert will persist for this many seconds other beacons
      :returns: the address given or constructed