[REF][fix_unused_imports] improvements in the structure of the relative imports code