code: def make_existence_bitvector_udf(arr: List[str]):
      """one-hot encode elements of target depending on their existence in arr."""
  
      default = [0] * len(arr)
  
      def encode(target: List[str]):
          bitvec = default.copy()
          for i, arr_item in enumerate(arr):
              if arr_item in target:
                  bitvec[i] = 1
          return bitvec
  
      return udf(encode, ArrayType(LongType()))
  
imports: import logging
  from typing import List, Optional, Tuple
  from pyspark.sql.functions import col, crc32, explode, map_keys, udf
  from pyspark.sql.types import ArrayType, BooleanType, FloatType, LongType, MapType, StructField, StructType
  from reagent.data.data_fetcher import DataFetcher
  from reagent.data.spark_utils import get_spark_session, get_table_url
  from reagent.workflow.types import Dataset, TableSpec
label_desc: Use image node_id 9 for calling a global function with example usage: make_existence_bitvector_udf(arr) and returns: udf, bitvec