TensorFlow 2.2 folded the keras_applications package completely into TensorFlow: tensorflow/tensorflow@23c3bda
This means that from keras_applications.imagenet_utils import _obtain_input_shape fails to find the module unless this is installed separately.
This code should hence be updated to use tf.keras.applications or the dependency on that old package should be documented.