Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_sbml_function_definitions(path):
sbml_model = __read_sbml_model(path)[0]
function_definitions = []
for i in range(sbml_model.getNumFunctionDefinitions()):
function = sbml_model.getFunctionDefinition(i)
function_name = function.getId()
function_tree = function.getMath()
num_nodes = function_tree.getNumChildren()
function_args = [function_tree.getChild(i).getName() for i in range(num_nodes-1)]
function_string = __get_math(function_tree.getChild(num_nodes-1))
fd = {"name":function_name, "function":function_string, "args":function_args}
function_definitions.append(fd)
return function_definitions