<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_oa_version(doi):
 """ Get an OA version for a given DOI. .. note:: Uses beta.dissem.in API. :param doi: A canonical DOI. :returns: The URL of the OA version of the given DOI, or ``None``. 'http://arxiv.org/abs/1506.06690' """

    try:
        request = requests.get("%s%s" % (DISSEMIN_API, doi))
        request.raise_for_status()
        result = request.json()
        assert result["status"] == "ok"
        return result["paper"]["pdf_url"]
    except (AssertionError, ValueError, KeyError, RequestException):
        return None