Using API to setup 'Git shallow close' and 'Skip outdated deployment jobs' after a repo export

We are migrating about 400 repos from one gitlab server to another. Both gitlab servers are version 13.0.8-ee.

Is there a python function/class which can change ‘Git shallow clone’ and ‘Skip outdated deployments’?

The original repo’s was set to ‘blank’ for the ‘Git shallow…’ and unchecked for the ‘Skip outdated…’
After the test migration, ‘Git shallow…’ became 50 and ‘Skip outdated…’ was checked.

We want to put back the original settings programmatically for all 400 repos. Thanks!