code: def parse_text_urls(mesg):
      
  
      rval = []
  
      loc = 0
  
      for match in URLRE.finditer(mesg):
          if loc < match.start():
              rval.append(Chunk(mesg[loc:match.start()], None))
          # Turn email addresses into mailto: links
          email = match.group("email")
          if email and "mailto" not in email:
              mailto = "mailto:{}".format(email)
          else:
              mailto = match.group(1)
          rval.append(Chunk(None, mailto))
          loc = match.end()
  
      if loc < len(mesg):
          rval.append(Chunk(mesg[loc:], None))
  
      return rval
docs: Parse a block of text, splitting it into its url and non-url
      components.