docstr: Add CORS header if the TabPy has attribute _cors_origin
  and _cors_origin is not an empty string.
docstr_tok: ["Add","CORS","header","if","the","TabPy","has","attribute","_cors_origin","and","_cors_origin","is","not","an","empty","string","."]
code: def _add_CORS_header(self):
      """
      Add CORS header if the TabPy has attribute _cors_origin
      and _cors_origin is not an empty string.
      """
      origin = self.tabpy_state.get_access_control_allow_origin()
      if len(origin) > 0:
          self.set_header("Access-Control-Allow-Origin", origin)
          self.logger.log(
              logging.DEBUG, f"Access-Control-Allow-Origin:{origin}"
          )
  
      headers = self.tabpy_state.get_access_control_allow_headers()
      if len(headers) > 0:
          self.set_header("Access-Control-Allow-Headers", headers)
          self.logger.log(
              logging.DEBUG, f"Access-Control-Allow-Headers:{headers}"
          )
  
      methods = self.tabpy_state.get_access_control_allow_methods()
      if len(methods) > 0:
          self.set_header("Access-Control-Allow-Methods", methods)
          self.logger.log(
              logging.DEBUG, f"Access-Control-Allow-Methods:{methods}"
          )
  
imports: import base64
  import binascii
  import concurrent
  import json
  import logging
  import tornado.web
  from tabpy.tabpy_server.app.app_parameters import SettingsParameters
  from tabpy.tabpy_server.handlers.util import hash_password
  from tabpy.tabpy_server.handlers.util import AuthErrorStates
  import uuid
label_desc: Use image node_id 4 for calling the BaseHandler obj's underlying member method code with example usage: obj._add_CORS_header() without return types