code: def is_valid_caption(caption, rules={"↙️", "[CLS]", "[SEP]"}):
      check_anno = caption.strip()[
          :-1
      ]  # Remove the ending delimiter from the caption.
      for ch in rules:
          if ch in check_anno:
              return False
      return True
  
file_path: mmdetection/tools/dataset_converters/grit2odvg.py
imports: import argparse
  import json
  import multiprocessing
  import os
  import os.path
  import emoji
  import jsonlines
  from transformers import AutoTokenizer
label_desc: Use image node_id 1 for calling a global function with example usage: is_valid_caption(caption, rules) and returns: True, False