def checksum_from_sha1(value):
<EOL>CHECKSUM_RE = re.compile('<STR_LIT>', re.UNICODE)<EOL>match = CHECKSUM_RE.match(value)<EOL>if match:<EOL><INDENT>return checksum.Algorithm(identifier='<STR_LIT>', value=match.group(<NUM_LIT:1>))<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
Return an spdx.checksum.Algorithm instance representing the SHA1
checksum or None if does not match CHECKSUM_RE.