protected function _getEntityType($attribute)
{
$entityTypeCode = '';
try {
$entityType = $attribute->getEntityType();
if ($entityType instanceof \Mage_Eav_Model_Entity_Type) {
$entityTypeCode = $entityType->getEntityTypeCode();
}
} catch (Exception $e) {
}
return $entityTypeCode;
}