I am using the following function construct a css selector using BS4:
def nth_of_type(elem): count, curr = 0, 0 for i, e in enumerate(elem.find_parent().f