This should either be removed and warnings.warn should be used in line 12 or `import warnings` should be removed and line 21 should just use warn.