What I'd like to do is avoid an import that cause a problem. My code is like this:
main.py
import external_library
external_library.py
import package_with_problem
I know I could change external_library.py with something as
try:
    import package_with_problem
except:
    pass
but I'm looking for a solution to implement in main.py. I would like a skip function that takes the package name as parameters and avoid the import.