code: def __new__(cls, search_space_name: str, dataset: str):
      if (search_space_name, dataset) not in cls._instances:
          instance = super(ImgScoreQueryApi, cls).__new__(cls)
          instance.search_space_name, instance.dataset = (
              search_space_name,
              dataset,
          )
  
          # read pre-scored file path
          if search_space_name == Config.NB201:
              if dataset == Config.c10:
                  instance.pre_score_path = pre_score_path_201C10
                  instance.express_score_path = (
                      expreflow_score_path_201C10
                  )
              elif dataset == Config.c100:
                  instance.pre_score_path = pre_score_path_201C100
                  instance.express_score_path = (
                      expreflow_score_path_201C100
                  )
              elif dataset == Config.imgNet:
                  instance.pre_score_path = pre_score_path_201IMG
                  instance.express_score_path = (
                      expreflow_score_path_201IMG
                  )
          if search_space_name == Config.NB101:
              instance.pre_score_path = pre_score_path_101C10
              instance.express_score_path = expreflow_score_path_101C10
  
          instance.data = read_json(instance.pre_score_path)
          express_score_data = read_json(instance.express_score_path)
          for arch_id in express_score_data:
              if arch_id in instance.data:
                  instance.data[arch_id].update(
                      express_score_data[arch_id]
                  )
              else:
                  instance.data[arch_id] = express_score_data[arch_id]
  
          instance.global_rank = generate_global_rank(
              instance.data, instance.default_alg_name_list
          )
  
          cls._instances[(search_space_name, dataset)] = instance
      return cls._instances[(search_space_name, dataset)]
  
imports: import os
  import random
  from src.common.constant import Config
  from src.tools.io_tools import read_json, write_json
  from src.query_api.singleton import Singleton
  from src.tools.io_tools import read_pickle
  from src.tools.compute import generate_global_rank
label_desc: Use image node_id 1 for calling the ImgScoreQueryApi obj's underlying member method code with example usage: obj.__new__(cls, search_space_name, dataset) and returns: cls