
    Design a function for an automated writing assessment system that determines if a specific score represents the predominant performance level among student submissions. Given a sorted array of student grammar accuracy scores and a target score threshold, determine if that threshold score appears in more than half of all submissions. The function should analyze the frequency of the target score within the sorted collection of student performance data to identify if it constitutes a majority pattern in the current assessment batch.
    

    
def binary_search(arr, low, high, x):
    if high >= low:
        mid = (low + high) // 2
        if (mid == 0 or x > arr[mid - 1]) and arr[mid] == x:
            return mid
        elif x > arr[mid]:
            return binary_search(arr, mid + 1, high, x)
        else:
            return binary_search(arr, low, mid - 1, x)
    return -1

def is_majority(arr, n, x):
    """
    Design a function for an automated writing assessment system that determines if a specific score represents the predominant performance level among student submissions. Given a sorted array of student grammar accuracy scores and a target score threshold, determine if that threshold score appears in more than half of all submissions. The function should analyze the frequency of the target score within the sorted collection of student performance data to identify if it constitutes a majority pattern in the current assessment batch.
    

    """
def binary_search(arr, low, high, x):
    if high >= low:
        mid = (low + high) // 2
        if (mid == 0 or x > arr[mid - 1]) and arr[mid] == x:
            return mid
        elif x > arr[mid]:
            return binary_search(arr, mid + 1, high, x)
        else:
            return binary_search(arr, low, mid - 1, x)
    return -1

def is_majority(arr, n, x):
    """
    Design a function for an automated writing assessment system that determines if a specific score represents the predominant performance level among student submissions. Given a sorted array of student grammar accuracy scores and a target score threshold, determine if that threshold score appears in more than half of all submissions. The function should analyze the frequency of the target score within the sorted collection of student performance data to identify if it constitutes a majority pattern in the current assessment batch.
    

    """
    i = binary_search(arr, 0, n - 1, x)
    if i == -1:
        return False
    if i + n // 2 <= n - 1 and arr[i + n // 2] == x:
        return True
    else:
        return False