def METHOD_NAME(self, g, the_keys, n):
    # get weight index from GAN
    if not g.weight_is_set_by_GAN:
        return
    ek = self.user_info.weight_key
    dim = len(ek)
    if dim != 2:
        self.fatal(f"you must provide 2 values for weight, while it was {dim}")
    g.weight_gan_index = [the_keys.index(ek[0]), the_keys.index(ek[1])]