shotgun_mode.mu still exists but replacing shotgun with shotgrid does the trick
import rv
rv.runtime.eval("""
shotgrid_mode.theMode().versionNameFromSource("%s");
""" % rv.commands.sourcesAtFrame(rv.commands.frame())[0], ["shotgrid_mode"])
rv.runtime.eval(
"""shotgrid_mode.theMode().updateTrackingInfo("one", nil);""",
["shotgrid_mode"]
)