Check if GameObjects are from the same prefab?

For my pooling system, I’d like to check if 2 game objects are of the same prefab in C#. If two objects are both instantiated from the prefab, I’d like to know. How can I do this?

Take a look at this one: PrefabUtility.GetPrefabType()