def in_par(par_dict, pos):
    """
    in_par
    =====
    This method is used to check that a X chromosome position is in the pseudoautosomal region (PAR) or not.
     It uses the PAR region information for the config file to identify if the position is in the PAR or not.
     This method expects the 'PAR' dict from the config file. (Example: config_dict['PAR']['GRCh38'])

    Parameters:
    -----------
    1) par_dict: (dict) A genome build specific dictionary from the PAR section of the config file.
    2) pos:      (int)  The X chromosome position to evaluate

    Returns:
    ++++++++
    1) True (bool) if the position is in the PAR, False if in the NonPAR region, ValueError otherwise
    """

    if pos > par_dict["X_PAR1"]["start"] and pos <= par_dict["X_PAR1"]["end"]:
        return True
    elif pos > par_dict["X_PAR2"]["start"] and pos <= par_dict["X_PAR2"]["end"]:
        return True
    elif pos > par_dict["X_NONPAR"]["start"] and pos <= par_dict["X_NONPAR"]["end"]:
        return False
    else:
        raise ValueError("Within gene position outside of X chromosome")