Added docstring for new function and warning class