code: def generate_lines(self, infile):
          
          pound = '#'
          
          for line in infile:
  
              heading = 0
  
              if line.startswith(pound):
                  heading = self.hash_count(line)
  
              yield dict(line=line, heading=heading)
docs: Split file into lines
  
          return dict with line=input, depth=n