code: def _header_message_type_update(obj, attr):
          
          old_enum = obj.message_type
          new_header = attr[1]
          new_enum = new_header.__class__.message_type.enum_ref
          #: This 'if' will be removed on the future with an
          #: improved version of __init_subclass__ method of the
          #: GenericMessage class
          if old_enum:
              msg_type_name = old_enum.name
              new_type = new_enum[msg_type_name]
              new_header.message_type = new_type
          return (attr[0], new_header)
docs: Update the message type on the header.
  
          Set the message_type of the header according to the message_type of
          the parent class.