There's no reason to import this inline; just add the import at the top. Also; we prefer imports of modules rather than functions - `import warnings` and then `warnings.warn(...)`.