def isGlideinHeldNTimes(jobInfo, factoryConfig=None, n=20):
    """This function looks at the glidein job's information and returns if the
    CondorG job is held for more than N(defaults to 20) iterations

    This is useful to remove Unrecoverable glidein (CondorG job) with forcex option.

    Args:
        jobInfo (dict): Dictionary containing glidein job's classad information

    Returns:
        bool: True if job is held more than N(defaults to 20) iterations, False if otherwise.
    """
    if factoryConfig is None:
        factoryConfig = globals()["factoryConfig"]

    greater_than_n_iterations = False
    nsysholds = jobInfo.get("NumSystemHolds")
    if nsysholds > n:
        greater_than_n_iterations = True

    return greater_than_n_iterations