How to ensure that a python function generates its output based only on its input? How to ensure that a python function generates its output based only on its input? database database