code: def get_index_text(self, modname, name_cls):
          
          if self.objtype in ('class', 'record'):
              if not modname:
                  return _('%s (built-in %s)') % (name_cls[0], self.objtype)
              return _('%s (%s in %s)') % (name_cls[0], self.objtype, modname)
          else:
              return ''
docs: Return index entry text based on object type.