<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def transform_sparql_update(rdf, update_query):
 """Perform a SPARQL Update transformation on the RDF data."""


    logging.debug("performing SPARQL Update transformation")

    if update_query[0] == '@':  # actual query should be read from file
        update_query = file(update_query[1:]).read()

    logging.debug("update query: %s", update_query)
    rdf.update(update_query)