AttributeError: type object 'Dataset' has no attribute 'from_generator'

Hi, I just encounter this problem when I want to use datasets package in python. My datasets version is now 2.1.0, and I got the error like the title:

AttributeError: type object 'Dataset' has no attribute 'from_generator'

My code is like this:

ds = Dataset.from_generator(resampleGen)

Thank you.