code: def get_bilou_key_for_tag(tag_name: Text) -> Text:
      """Get the message key for the BILOU tagging format of the provided tag name.
  
      Args:
          tag_name: the tag name
  
      Returns:
          the message key to store the BILOU tags
      """
      if tag_name == ENTITY_ATTRIBUTE_ROLE:
          return BILOU_ENTITIES_ROLE
  
      if tag_name == ENTITY_ATTRIBUTE_GROUP:
          return BILOU_ENTITIES_GROUP
  
      return BILOU_ENTITIES
  
imports: import logging
  import operator
  from collections import defaultdict, Counter
  from typing import List, Tuple, Text, Optional, Dict, Any, TYPE_CHECKING
  from rasa.nlu.constants import TOKENS_NAMES, BILOU_ENTITIES, BILOU_ENTITIES_GROUP, BILOU_ENTITIES_ROLE
  from rasa.shared.nlu.constants import TEXT, ENTITIES, ENTITY_ATTRIBUTE_START, ENTITY_ATTRIBUTE_END, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_GROUP, ENTITY_ATTRIBUTE_ROLE, NO_ENTITY_TAG
label_desc: Use image node_id 4 for calling a global function with example usage: get_bilou_key_for_tag(tag_name) and returns: BILOU_ENTITIES, BILOU_ENTITIES_ROLE, BILOU_ENTITIES_GROUP