<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def buildQName(ncname, prefix, memory, len):
 """Builds the QName @prefix:@ncname in @memory if there is enough space and prefix is not None nor empty, otherwise allocate a new string. If prefix is None or empty it returns ncname. """

    ret = libxml2mod.xmlBuildQName(ncname, prefix, memory, len)
    return ret