Code reference from repyv2 shim tutorial