Cannot access generalization in base class

Hi, I’m trying to customize a template, but I realize there is not possible to access generalization in the base clase.
$baseClass.generalizationCount() this gives 0
$childClass.generalizationCount() this gives 1, but is the same generalization, but I can’t access it in the base class.
Any suggestion, I need to access that information in base class.