Type object 'ImageClassifierData' has no attribute 'from_path_and_array'

data = ImageClassifierData.from_path_and_array(path_for_models,fn,csv_fname,bs=64,tfms=(tfms,tfms),skip_header=True)

AttributeError: type object ‘ImageClassifierData’ has no attribute ‘from_path_and_array’

Why is this happening?

AttributeError Traceback (most recent call last)
in ()
1 arch=resnet34
----> 2 data = ImageClassifierData.from_names_and_array(
3 path=PATH,
4 fnames=fnames,
5 y=labels,

AttributeError: type object ‘ImageClassifierData’ has no attribute ‘from_names_and_array’

Please help, why this error is coming