<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def grab_rdflib_graph_version(g: Graph) -> str:
        ''' Crap-shot for ontology iri if its properly in the header and correctly formated '''
        version = g.subject_objects( predicate = URIRef( OWL.versionIRI ) )
        version = [o for s, o in version]
        if len(version) != 1:
            print('versioning isn\'t correct')
        else:
            version = str(version[0])
            return version