extractModelName function

Extract the method name associated with a single train object