def instances_based_condition(df,col1,val1,col2,val2):
    """ Instances based on the condition
    This function accepts a dataframe, 2 columns(feature) and 2 values which returns the dataframe
    based on the condition.
    """

    instance = df[(df[col1] > val1) & (df[col2]== val2)]
    return instance