code: def filter_quotes(text, is_email=True):
      """
      filter the quoted text out of a message
      """
      global PAT_FORWARD, PAT_REPLIED, PAT_UNSUBSC
  
      if is_email:
          text = filter(lambda x: x in string.printable, text)
  
          # strip off quoted text in a forward
          m = PAT_FORWARD.split(text, re.M)
  
          if m and len(m) > 1:
              text = m[0]
  
          # strip off quoted text in a reply
          m = PAT_REPLIED.split(text, re.M)
  
          if m and len(m) > 1:
              text = m[0]
  
          # strip off any trailing unsubscription notice
          m = PAT_UNSUBSC.split(text, re.M)
  
          if m:
              text = m[0]
  
      # replace any remaining quoted text with blank lines
      lines = []
  
      for line in text.split("\n"):
          if line.startswith(">"):
              lines.append("")
          else:
              lines.append(line)
  
      return list(split_grafs(lines))
  
imports: from .base import BaseTextRank
  from .positionrank import PositionRank
  from collections import defaultdict, OrderedDict
  from math import sqrt
  from spacy.tokens import Doc
  import graphviz
  import json
  import logging
  import networkx
  import os
  import os.path
  import re
  import spacy
  import string
  import sys
  import time
  import unicodedata
label_desc: Use image node_id 2 for calling a global function with example usage: filter_quotes(text, is_email) and returns: list