/**
 * This function searches for artifacts in a given list based on a given condition.
 *
 * @param artifactsList A list of artifacts.
 * @param condition A function that takes an artifact as input and returns a boolean value.
 * @return A list of artifacts that satisfy the given condition.
 */
fun searchArtifacts(artifactsList: List<Any>, condition: (Any) -> Boolean): List<Any> {

    // Initialize an empty list to store the matching artifacts
    val matchingArtifacts = mutableListOf<Any>()

    // Iterate through each artifact in the list
    for (artifact in artifactsList) {
        // Check if the artifact satisfies the given condition
        if (condition(artifact)) {
            // Append the matching artifact to the list
            matchingArtifacts.add(artifact)
        }
    }

    // Return the list of matching artifacts
    return matchingArtifacts
}
/**
 * This function searches for artifacts in a given list based on a given condition.
 *
 * @param artifactsList A list of artifacts.
 * @param condition A function that takes an artifact as input and returns a boolean value.
 * @return A list of artifacts that satisfy the given condition.
 */
fun searchArtifacts(artifactsList: List<Any>, condition: (Any) -> Boolean): List<Any> {
/**
 * This function searches for artifacts in a given list based on a given condition.
 *
 * @param artifactsList A list of artifacts.
 * @param condition A function that takes an artifact as input and returns a boolean value.
 * @return A list of artifacts that satisfy the given condition.
 */
fun searchArtifacts(artifactsList: List<Any>, condition: (Any) -> Boolean): List<Any> {

    // Initialize an empty list to store the matching artifacts
    val matchingArtifacts = mutableListOf<Any>()

    // Iterate through each artifact in the list
    for (artifact in artifactsList) {
        // Check if the artifact satisfies the given condition
        if (condition(artifact)) {
            // Append the matching artifact to the list
            matchingArtifacts.add(artifact)
        }
    }

    // Return the list of matching artifacts
    return matchingArtifacts
}