Solved by ptrblck in post #3 
              
              
                As the error message explains, you need to provide default values for all arguments to a function call after the first default was set. 
def __init__(self,image_paths,mask_paths = None,augmentations,preprocessing_fn=None):

is thus wrong and you would have to use: 
def __init__(self,image_paths,mask…