def METHOD_NAME(self, namespace: str, prefix: str = "base"):
    """
    This function adds the prefixes for SPARQL query.
    Arguments:
        namespace - uri namespace of ontology
        prefix - prefix reference for namespace (optional) defaults to base if omitted
    """
    if prefix in self.prefix:
        logger.error(prefix + " has already been added. Please input a new prefix.")
        raise QueryBuilderError(prefix + " has already been added. Please input a new prefix.")
    elif namespace in self.prefix:
        logger.error(namespace + " exists. Please input a new namespace.")
        raise QueryBuilderError(namespace + " exists. Please input a new namespace.")
    self.prefix += "PREFIX " + prefix + ":<" + namespace + ">\n"
    return self