def intersect(samples,counter=0):
    
    """ This command uses recursion to find the intersections between a variable number of sets given in samples. 
        Where samples = [set_1,set_2,...,set_n] """
    
    if len(samples) == 1: 
        return samples[0]
    a = samples[counter]
    b = samples[counter+1::]
    if len(b) == 1: #check to see whether the recursion has reached the final element
        return a & b[0]
    else:
        counter += 1 
        return a & intersect(samples,counter)