old_contents: # Generic rules for FMN
  import fedmsg
  
  import fmn.rules.utils
  
  
  def user_filter(config, message, fasnick=None, *args, **kw):
      """ All messages for a certain user
  
      Use this rule to include messages that are associated with a
      specific user.
      """
  
      fasnick = kw.get('fasnick', fasnick)
      if fasnick:
          return fasnick in fedmsg.meta.msg2usernames(message, **config)
  
  
  def user_package_filter(config, message, fasnick=None, *args, **kw):
      """ All messages concerning user's packages
  
      This rule includes messages that relate to packages where the
      specified user has **commit** ACLs.
      """
  
      fasnick = kw.get('fasnick', fasnick)
      if fasnick:
          user_packages = fmn.rules.utils.get_packages_of_user(config, fasnick)
          msg_packages = fedmsg.meta.msg2packages(message, **config)
          return user_packages.intersection(msg_packages)
  
  
  def package_filter(config, message, package=None, *args, **kw):
      """ All messages pertaining to a certain package
  
      Use this rule to include messages that relate to a certain package
      (*i.e., nethack*).
      """
  
      package = kw.get('package', package)
      if package:
          return package in fedmsg.meta.msg2packages(message, **config)
  
  
  def trac_hosted_filter(config, message, project=None, *args, **kw):
      """ Filter the messages for a specified fedorahosted project
  
       Adding this rule allows you to get notifications for one or more
       `fedorahosted <https://fedorahosted.org>`_ project. Specify multiple
       projects by separating them with a comma ','.
       """
      project = kw.get('project', project)
      link = fedmsg.meta.msg2link(message, **config)
      if not link:
          return False
  
      project = project.split(',')
  
      valid = False
      for proj in project:
          if '://fedorahosted.org/%s/' % proj.strip() in link:
              valid = True
  
      return valid
  
new_contents: # Generic rules for FMN
  import fedmsg
  
  import fmn.rules.utils
  
  
  def user_filter(config, message, fasnick=None, *args, **kw):
      """ All messages for a certain user
  
      Use this rule to include messages that are associated with a
      specific user.
      """
  
      fasnick = kw.get('fasnick', fasnick)
      if fasnick:
          return fasnick in fedmsg.meta.msg2usernames(message, **config)
  
  
  def user_package_filter(config, message, fasnick=None, *args, **kw):
      """ All messages concerning user's packages
  
      This rule includes messages that relate to packages where the
      specified user has **commit** ACLs.
      """
  
      fasnick = kw.get('fasnick', fasnick)
      if fasnick:
          user_packages = fmn.rules.utils.get_packages_of_user(config, fasnick)
          msg_packages = fedmsg.meta.msg2packages(message, **config)
          return user_packages.intersection(msg_packages)
  
  
  def package_filter(config, message, package=None, *args, **kw):
      """ All messages pertaining to a certain package
  
      Use this rule to include messages that relate to a certain package
      (*i.e., nethack*).
      """
  
      package = kw.get('package', package)
      if package:
          return package in fedmsg.meta.msg2packages(message, **config)
  
  
  def trac_hosted_filter(config, message, project=None, *args, **kw):
      """ Filter the messages for one or more fedorahosted projects
  
       Adding this rule allows you to get notifications for one or more
       `fedorahosted <https://fedorahosted.org>`_ project. Specify multiple
       projects by separating them with a comma ','.
       """
      project = kw.get('project', project)
      link = fedmsg.meta.msg2link(message, **config)
      if not link:
          return False
  
      project = project.split(',')
  
      valid = False
      for proj in project:
          if '://fedorahosted.org/%s/' % proj.strip() in link:
              valid = True
  
      return valid
  
subject: Fix the docstring to be more accurate about the function's action