code: def _add_eol_comment(element, *args, **kwargs):
      """
      add_eol_comment
      args --> (comment, key)
      """
      if (
          element is None
          or (
              not isinstance(element, CommentedMap)
              and not isinstance(element, CommentedSeq)
          )
          or args[0] is None
          or len(args[0]) == 0
      ):
          return
  
      comment = args[0]
      # comment is empty, do nothing
      if not comment:
          return
  
      key = args[1]
      try:
          element.yaml_add_eol_comment(*args, **kwargs)
      except Exception:
          element.ca.items.pop(key, None)
          element.yaml_add_eol_comment(*args, **kwargs)
  
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 2 for calling a global function with example usage: _add_eol_comment(element) without return types