code: def update_map_element(element, key, value, comment, _type):
      """
      element:
      key:
      value:
      comment:
      _type:  value type.
      """
      if element is None or not isinstance(element, CommentedMap):
          print("Only key-value update support")
          sys.exit(1)
  
      origin_comment = _map_comment(element, key)
  
      sub_element = element.get(key, None)
      if isinstance(sub_element, CommentedMap) or isinstance(
          sub_element, CommentedSeq
      ):
          print("Only support update a single value")
  
      element.update({key: value})
  
      comment = _obtain_comment(origin_comment, comment)
      _add_eol_comment(element, _extract_comment(comment), key)
  
imports: import sys
  import argparse
  from argparse import Namespace
  import os, shutil
  import getopt
  from ruamel.yaml import YAML, yaml_object
  from ruamel.yaml.comments import CommentedSeq, CommentedMap
  from ruamel.yaml.tokens import CommentToken
label_desc: Use image node_id 9 for calling a global function with example usage: update_map_element(element, key, value, comment, _type) without return types