code: def _generate_union_tag_state_funcs(self, union):
          
          for field in union.all_fields:
              enum_field_name = fmt_enum_name(field.name, union)
  
              with self.block_func(
                      func='is{}'.format(fmt_camel_upper(field.name)),
                      args=[],
                      return_type='BOOL'):
                  self.emit('return _tag == {};'.format(enum_field_name))
              self.emit()
  
          with self.block_func(
                  func='tagName', args=[], return_type='NSString *'):
              with self.block('switch (_tag)'):
                  for field in union.all_fields:
                      enum_field_name = fmt_enum_name(field.name, union)
                      self.emit('case {}:'.format(enum_field_name))
                      self.emit('   return @"{}";'.format(enum_field_name))
              self.emit()
              self._generate_throw_error('InvalidTag',
                                         '@"Tag has an unknown value."')
          self.emit()
docs: Emits the is<TAG_NAME> methods and tagName method for determining
          tag state and retrieving human-readable value of tag state, respectively.