'Get the version (an ObjectID) of the given library.
Returns None if the library does not exist.'

def get_library_version(self, lib_key):

    library = self._get_library(lib_key)
    if library:
        assert (library.location.library_key.version_guid is not None)
        return library.location.library_key.version_guid
    return None
