Python function which takes an input file containing html (in .html or .txt format), and the name of an output file, and uses the BeautifulSoup library to extract the name of the institution stored in a <h2> tag, and the contents of a set of <td> tags that contain profile information stored in a Higher Education Directory.