def METHOD_NAME(checksum):
    """Guess algorithm of "checksum".
    If "checksum" starts with "source=", returns MTIME_AND_SIZE.
    Otherwise, use length of checksum to guess algorithm, based on the built-in
    functions from hashlib.
    Return None if it fails to make a guess.
    """
    if checksum.startswith("source="):
        return MTIME_AND_SIZE
    global _HASH_LENGTHS
    if _HASH_LENGTHS is None:
        _HASH_LENGTHS = {}
        for algorithm, func in inspect.getmembers(hashlib, inspect.isbuiltin):
            try:
                _HASH_LENGTHS[len(func().hexdigest())] = algorithm
            except TypeError:
                pass
    return _HASH_LENGTHS.get(len(checksum))