code: def remove_ticket_directives(message):
      
      if message:
          message = re.sub(r'closes #', '#', message)
          message = re.sub(r'addresses #', '#', message)
          message = re.sub(r'references #', '#', message)
      return message
docs: Remove ticket directives like "(closes #123).
  
      >>> remove_ticket_directives('(closes #123)')
      '(#123)'
      >>> remove_ticket_directives('(foo #123)')
      '(foo #123)'