<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_bibtex(doi):
 """ Get a BibTeX entry for a given DOI. .. note:: Adapted from https://gist.github.com/jrsmith3/5513926. :param doi: The canonical DOI to get BibTeX from. :returns: A BibTeX string or ``None``. '@article{Verney_2015,\\n\\tdoi = {10.1209/0295-5075/111/40005},\\n\\turl = {http://dx.doi.org/10.1209/0295-5075/111/40005},\\n\\tyear = 2015,\\n\\tmonth = {aug},\\n\\tpublisher = {{IOP} Publishing},\\n\\tvolume = {111},\\n\\tnumber = {4},\\n\\tpages = {40005},\\n\\tauthor = {Lucas Verney and Lev Pitaevskii and Sandro Stringari},\\n\\ttitle = {Hybridization of first and second sound in a weakly interacting Bose gas},\\n\\tjournal = {{EPL}}\\n}' """

    try:
        request = requests.get(to_url(doi),
                               headers={"accept": "application/x-bibtex"})
        request.raise_for_status()
        assert request.headers.get("content-type") == "application/x-bibtex"
        return request.text
    except (RequestException, AssertionError):
        return None