<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def inferNamespacePrefix(aUri):
 """ From a URI returns the last bit and simulates a namespace prefix when rendering the ontology. eg from <'http://www.w3.org/2008/05/skos#'> it returns the 'skos' string """

    stringa = aUri.__str__()
    try:
        prefix = stringa.replace("#", "").split("/")[-1]
    except:
        prefix = ""
    return prefix