code: def _finish_fragment(self):
          
  
          if self.fragment:
              self.fragment.finish()
              if self.fragment.headers:
                  # Regardless of what's been seen to this point, if we encounter a headers fragment,
                  # all the previous fragments should be marked hidden and found_visible set to False.
                  self.found_visible = False
                  for f in self.fragments:
                      f.hidden = True
              if not self.found_visible:
                  if self.fragment.quoted \
                          or self.fragment.headers \
                          or self.fragment.signature \
                          or (len(self.fragment.content.strip()) == 0):
  
                      self.fragment.hidden = True
                  else:
                      self.found_visible = True
              self.fragments.append(self.fragment)
          self.fragment = None
docs: Creates fragment