code: def extract_emoji(text):
      """
      Parameters
      ----------
      text, str
  
      Returns
      -------
      List of 5.0-compliant emojis that occur in text.
      """
      found_emojis = []
      len_text = len(text)
      i = 0
      while i < len_text:
          cur_char = ord(text[i])
          try:
              VALID_EMOJIS[cur_char]
          except:
              i += 1
              continue
          found = False
          for dict_len, candidates in VALID_EMOJIS[cur_char]:
              if i + dict_len <= len_text:
                  if dict_len == 0:
                      _append_if_valid(found_emojis, text[i])
                      i += 1
                      found = True
                      break
                  candidate = tuple(
                      ord(c) for c in text[i + 1 : i + 1 + dict_len]
                  )
                  if candidate in candidates:
                      _append_if_valid(
                          found_emojis, text[i : i + 1 + dict_len]
                      )
                      i += 1 + dict_len
                      found = True
                      break
              if found:
                  break
          if not found:
              _append_if_valid(found_emojis, text[i])
              i += 1
      return found_emojis
  
imports: import pandas
  from scattertext.emojis.ProcessedEmojiStructure import VALID_EMOJIS
label_desc: Use image node_id 3 for calling a global function with example usage: extract_emoji(text) and returns: found_emojis