code: def _set_federated_queue_policy(self, vhost, receive_queue_name):
      url = C_HTTP_TEMPLATE.format(
          self.endpoint,
          "{}/{}/{}".format("policies", vhost, receive_queue_name),
      )
      body = {
          "pattern": "^" + receive_queue_name + "$",
          "apply-to": "queues",
          "definition": {"federation-upstream": receive_queue_name},
      }
      LOGGER.debug(
          f"[rabbitmanager._set_federated_queue_policy]set_federated_queue_policy, url: {url} body: {body}"
      )
  
      result = requests.put(
          url,
          headers=C_COMMON_HTTP_HEADER,
          json=body,
          auth=(self.user, self.password),
      )
      LOGGER.debug(
          f"[rabbitmanager._set_federated_queue_policy] {result}"
      )
      if result.status_code != 201 and result.status_code != 204:
          LOGGER.debug(
              f"[rabbitmanager._set_federated_queue_policy] _set_federated_queue_policy fail. {result}"
          )
          return False
  
      return True
  
imports: import logging
  import time
  import requests
label_desc: Use image node_id 25 for calling the RabbitManager obj's underlying member method code with example usage: obj._set_federated_queue_policy(vhost, receive_queue_name) and returns: True, False