code: def extract_entity(data, pattern, index, delim=" "):
      pattern = re.compile(pattern)
      for line in data:
          if pattern.search(line):
              return line.split(delim)[index].strip()
      return None
  
imports: import csv
  import json
  import os
  import re
  import shutil
  import sys
  import tempfile
  import time
  from subprocess import PIPE, Popen
  from urllib.parse import urlparse
  import click
  import click_config_file
  import matplotlib.pyplot
  import numpy
  import pandas
  import requests
label_desc: Use image node_id 21 for calling a global function with example usage: extract_entity(data, pattern, index, delim) and returns: None, line