code: def search_jar(
      project_relative_path, sbt_jar_name_prefix, mvn_jar_name_prefix
  ):
      # Note that 'sbt_jar_name_prefix' and 'mvn_jar_name_prefix' are used since the prefix can
      # vary for SBT or Maven specifically. See also SPARK-26856
      project_full_path = os.path.join(
          SPARK_HOME, project_relative_path
      )
  
      # We should ignore the following jars
      ignored_jar_suffixes = (
          "javadoc.jar",
          "sources.jar",
          "test-sources.jar",
          "tests.jar",
      )
  
      # Search jar in the project dir using the jar name_prefix for both sbt build and maven
      # build because the artifact jars are in different directories.
      sbt_build = glob.glob(
          os.path.join(
              project_full_path,
              "target/scala-*/%s*.jar" % sbt_jar_name_prefix,
          )
      )
      maven_build = glob.glob(
          os.path.join(
              project_full_path, "target/%s*.jar" % mvn_jar_name_prefix
          )
      )
      jar_paths = sbt_build + maven_build
      jars = [
          jar
          for jar in jar_paths
          if not jar.endswith(ignored_jar_suffixes)
      ]
  
      if not jars:
          return None
      elif len(jars) > 1:
          raise RuntimeError(
              "Found multiple JARs: %s; please remove all but one"
              % (", ".join(jars))
          )
      else:
          return jars[0]
  
imports: import glob
  import os
  import struct
  import sys
  import unittest
  import difflib
  import functools
  import math
  from decimal import Decimal
  from time import time, sleep
  from typing import Any, Optional, Union, Dict, List, Callable
  from itertools import zip_longest
  from pyspark import SparkContext, SparkConf
  from pyspark.errors import PySparkAssertionError, PySparkException
  from pyspark.find_spark_home import _find_spark_home
  from pyspark.sql.dataframe import DataFrame
  from pyspark.sql import Row
  from pyspark.sql.types import StructType, StructField
  from pyspark.sql.functions import col, when
  from typing import TYPE_CHECKING
label_desc: Use image node_id 4 for calling a global function with example usage: search_jar(project_relative_path, sbt_jar_name_prefix, mvn_jar_name_prefix) and returns: None, jars