How do you ensure the reproducibility and version control of your code?
Implement is_reproducible_history(commits) to validate a commit history. Each commit is a map containing an id, a nullable parent, source code, a map of dependency versions, and a recorded fingerprint. A fingerprint is the source code followed by a newline and dependency entries sorted by dependency name, formatted as name=version and joined with &. Return true only when every fingerprint is correct, there is exactly one root commit, every parent exists, and all commits belong to one acyclic history.
def is_reproducible_history(commits):