def find_layer_of_feature(feature, embedding):
        """
        This function find the layer correspondent to the given feature in a certain embedding.
        It returns the layer name of the feature.
        :param feature: a feature : int
        :param embedding: a dictionary with keys: ['embeddings', 'image_paths', 'image_labels', 'feature_scheme']
        :return:
        """
        layers = embedding['feature_scheme'][()] ## Ordered dict.
        layer = None
        for i in layers.values():
                if feature in range(i[0], i[1]):
                        layer = i
                        # print(feature, i)
        try:
                layer_name =  list(layers.keys())[list(layers.values()).index(layer)]
                return layer_name
        except:
                print('Feature not in range')
        return None