<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def download_apcor(self, uri):
 """ Downloads apcor data. Args: uri: The URI of the apcor data file. Returns: apcor: ossos.downloads.core.ApcorData """


        local_file = os.path.basename(uri)
        if os.access(local_file, os.F_OK):
            fobj = open(local_file)
        else:
            fobj = storage.vofile(uri, view='data')
            fobj.seek(0)
        str = fobj.read()
        fobj.close()
        apcor_str = str
        return ApcorData.from_string(apcor_str)