code: def remove_blank_lines(source):
      
      io_obj = io.StringIO(source)
      source = [a for a in io_obj.readlines() if a.strip()]
      return "".join(source)
docs: Removes blank lines from *source* and returns the result.
  
      Example:
  
      .. code-block:: python
  
          test = "foo"
  
          test2 = "bar"
  
      Will become:
  
      .. code-block:: python
  
          test = "foo"
          test2 = "bar"