+
+ def bound_img(self, bound_name):
+ """Return an image of the given main_type's bound."""
+ b = self.val['flds_bnds']['bounds'].dereference()[bound_name]
+ bnd_kind = str(b['kind'])
+ if bnd_kind == 'PROP_CONST':
+ return str(b['data']['const_val'])
+ elif bnd_kind == 'PROP_UNDEFINED':
+ return '(undefined)'
+ else:
+ info = [bnd_kind]
+ if bound_name == 'high' and b['flag_upper_bound_is_count']:
+ info.append('upper_bound_is_count')
+ return '{} ({})'.format(str(b['data']['baton']), ','.join(info))
+