def METHOD_NAME(model, id, function):
    #type: (libsbml.Model, str, str)
    """
        this function adds a new function definition to the given sbml model
    """
    if model.getFunctionDefinition(id):
        raise ValueError('the model already has a function definition with id %s' % id)
    fun = model.createFunctionDefinition()
    fun.setId(id)
    math = libsbml.parseL3Formula(function)
    if not math: 
        raise ValueError('the formula could not be parsed')
    fun.setMath(math)