code: def get(self, endpoint_name):
      if self.should_fail_with_auth_error() != AuthErrorStates.NONE:
          self.fail_with_auth_error()
          return
  
      self.logger.log(
          logging.DEBUG,
          f"Processing GET for /endpoints/{endpoint_name}",
      )
  
      self._add_CORS_header()
      if not endpoint_name:
          self.write(json.dumps(self.tabpy_state.get_endpoints()))
      else:
          if endpoint_name in self.tabpy_state.get_endpoints():
              self.write(
                  json.dumps(
                      self.tabpy_state.get_endpoints()[endpoint_name]
                  )
              )
          else:
              self.error_out(
                  404,
                  "Unknown endpoint",
                  info=f"Endpoint {endpoint_name} is not found",
              )
  
file_path: TabPy/tabpy/tabpy_server/handlers/endpoint_handler.py
imports: import json
  import logging
  import shutil
  from tabpy.tabpy_server.common.util import format_exception
  from tabpy.tabpy_server.handlers import ManagementHandler
  from tabpy.tabpy_server.handlers.base_handler import STAGING_THREAD
  from tabpy.tabpy_server.management.state import get_query_object_path
  from tabpy.tabpy_server.psws.callbacks import on_state_change
  from tabpy.tabpy_server.handlers.util import AuthErrorStates
  from tornado import gen
label_desc: Use image node_id 2 for calling the EndpointHandler obj's underlying member method code with example usage: obj.get(endpoint_name) without return types