code: def set_feed_retention_policies(self, policy, feed_id, project=None):
          
          route_values = {}
          if project is not None:
              route_values['project'] = self._serialize.url('project', project, 'str')
          if feed_id is not None:
              route_values['feedId'] = self._serialize.url('feed_id', feed_id, 'str')
          content = self._serialize.body(policy, 'FeedRetentionPolicy')
          response = self._send(http_method='PUT',
                                location_id='ed52a011-0112-45b5-9f9e-e14efffb3193',
                                version='5.1-preview.1',
                                route_values=route_values,
                                content=content)
          return self._deserialize('FeedRetentionPolicy', response)
docs: SetFeedRetentionPolicies.
          [Preview API] Set the retention policy for a feed.
          :param :class:`<FeedRetentionPolicy> <azure.devops.v5_1.feed.models.FeedRetentionPolicy>` policy: Feed retention policy.
          :param str feed_id: Name or ID of the feed.
          :param str project: Project ID or project name
          :rtype: :class:`<FeedRetentionPolicy> <azure.devops.v5_1.feed.models.FeedRetentionPolicy>`