code: def remove(self, spam=False):
          
          url = self.reddit_session.config['remove']
          data = {'id': self.fullname,
                  'spam': 'True' if spam else 'False'}
          response = self.reddit_session.request_json(url, data=data)
          urls = [self.reddit_session.config[x] for x in ['modqueue', 'spam']]
          if isinstance(self, Submission) and hasattr(self, 'subreddit'):
              urls += self.subreddit._listing_urls  # pylint: disable=W0212
          self.reddit_session.evict(urls)
          return response
docs: Remove object. This is the moderator version of delete.
  
          The object is removed from the subreddit listings and placed into the
          spam listing. If spam is set to True, then the automatic spam filter
          will try to remove objects with similar attributes in the future.
  
          :returns: The json response from the server.