<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def import_file(package: str, fname: str) -> ModuleType: """Import file directly. This is a hack to import files from packages without importing <package>/__init__.py, its purpose is to allow import without requiring all the dependencies at this point. Args: package: Package to import from fname: File to import Returns: Imported module """

    mod_name = fname.rstrip('.py')
    spec = spec_from_file_location(mod_name, '{}/{}'.format(package, fname))
    module = module_from_spec(spec)
    spec.loader.exec_module(module)
    return module