code: def _get_actual_model(self, endpoint_name):
      # Find the actual query to run from given endpoint
      all_endpoint_names = []
  
      while True:
          endpoint_info = self.python_service.ps.query_objects.get(
              endpoint_name
          )
          if not endpoint_info:
              return [None, None]
  
          all_endpoint_names.append(endpoint_name)
  
          endpoint_type = endpoint_info.get("type", "model")
  
          if endpoint_type == "alias":
              endpoint_name = endpoint_info["endpoint_obj"]
          elif endpoint_type == "model":
              break
          else:
              self.error_out(
                  500,
                  "Unknown endpoint type",
                  info=f'Endpoint type "{endpoint_type}" does not exist',
              )
              return
  
      return (endpoint_name, all_endpoint_names)
  
imports: from tabpy.tabpy_server.handlers import BaseHandler
  import logging
  import time
  from tabpy.tabpy_server.common.messages import Query, QuerySuccessful, QueryError, UnknownURI
  from hashlib import md5
  import uuid
  import json
  from tabpy.tabpy_server.common.util import format_exception
  import urllib
  from tornado import gen
  from tabpy.tabpy_server.handlers.util import AuthErrorStates
label_desc: Use image node_id 7 for calling the QueryPlaneHandler obj's underlying member method code with example usage: obj._get_actual_model(endpoint_name) and returns: endpoint_name,  all_endpoint_names, list