Remove shared code as part of its migration to the dev-infra package. PR Close #53214
PR Close #52536