Source of a called function

How can i determine from what MC a function was called? I have an object implemented in several MCs which returns the same argument but would like to call different functions depending on the source MC.