Is squeezenet_ssd_config only containing the posted code or any class definitions?
Based on the import statement I would assume it’s a class or any other object, but the posted code shows just executable Python code with more imports.
You could try to deepcopy each imported class and see, if one of these classes might fail due to the previously mentioned reason.