class_docstr: The TabPy state object that stores attributes
  about this TabPy and perform GET/SET on these
  attributes.
  
  Attributes:
      - name
      - description
      - endpoints (name, description, docstring, version, target)
      - revision number
  
  When the state object is initialized, the state is saved as a ConfigParser.
  There is a config to any attribute.
class_docstr_tok: ["The","TabPy","state","object","that","stores","attributes","about","this","TabPy","and","perform","GET\/SET","on","these","attributes",".","Attributes",":","-","name","-","description","-","endpoints","(","name",",","description",",","docstring",",","version",",","target",")","-","revision","number","When","the","state","object","is","initialized",",","the","state","is","saved","as","a","ConfigParser",".","There","is","a","config","to","any","attribute","."]
docstr: Update an existing endpoint on the TabPy.
  
  Parameters
  ----------
  name : str
      Name of the endpoint
  description : str, optional
      Description of this endpoint
  doc_string : str, optional
      The doc string for this endpoint, if needed.
  endpoint_type : str, optional
      The endpoint type (model, alias)
  version : str, optional
      The version of this endpoint
  dependencies=[]
      List of dependent endpoints for this existing endpoint
  target : str, optional
      The target endpoint name for the alias.
  
  Note:
  For those parameters that are not specified, those values will not
  get changed.
docstr_tok: ["Update","an","existing","endpoint","on","the","TabPy",".","Parameters","--","--","--","--","--","name",":","str","Name","of","the","endpoint","description",":","str",",","optional","Description","of","this","endpoint","doc_string",":","str",",","optional","The","doc","string","for","this","endpoint",",","if","needed",".","endpoint_type",":","str",",","optional","The","endpoint","type","(","model",",","alias",")","version",":","str",",","optional","The","version","of","this","endpoint","dependencies=","[","]","List","of","dependent","endpoints","for","this","existing","endpoint","target",":","str",",","optional","The","target","endpoint","name","for","the","alias",".","Note",":","For","those","parameters","that","are","not","specified",",","those","values","will","not","get","changed","."]
code: def update_endpoint(
      self,
      name,
      description=None,
      docstring=None,
      endpoint_type=None,
      version=None,
      methods=None,
      target=None,
      dependencies=None,
      schema=None,
  ):
      """
      Update an existing endpoint on the TabPy.
  
      Parameters
      ----------
      name : str
          Name of the endpoint
      description : str, optional
          Description of this endpoint
      doc_string : str, optional
          The doc string for this endpoint, if needed.
      endpoint_type : str, optional
          The endpoint type (model, alias)
      version : str, optional
          The version of this endpoint
      dependencies=[]
          List of dependent endpoints for this existing endpoint
      target : str, optional
          The target endpoint name for the alias.
  
      Note:
      For those parameters that are not specified, those values will not
      get changed.
  
      """
      try:
          if not self._check_endpoint_exists(name):
              raise ValueError(f"endpoint {name} does not exist.")
  
          endpoints = self.get_endpoints()
          endpoint_info = endpoints[name]
  
          description = self._check_and_set_endpoint_description(
              description, endpoint_info["description"]
          )
          docstring = self._check_and_set_endpoint_docstring(
              docstring, endpoint_info["docstring"]
          )
          endpoint_type = self._check_and_set_endpoint_type(
              endpoint_type, endpoint_info["type"]
          )
          dependencies = self._check_and_set_dependencies(
              dependencies, endpoint_info.get("dependencies", [])
          )
  
          self._check_target(target)
          if target and target not in endpoints:
              raise ValueError("target endpoint is not valid.")
          elif not target:
              target = endpoint_info["target"]
  
          if version and not isinstance(version, int):
              raise ValueError("version must be an int.")
          elif not version:
              version = endpoint_info["version"]
  
          endpoint_info = {
              "description": description,
              "docstring": docstring,
              "type": endpoint_type,
              "version": version,
              "dependencies": dependencies,
              "target": target,
              "creation_time": endpoint_info["creation_time"],
              "last_modified_time": int(time()),
              "schema": schema,
          }
  
          endpoints[name] = endpoint_info
          self._add_update_endpoints_config(endpoints)
      except Exception as e:
          logger.error(f"Error in update_endpoint: {e}")
          raise
  
imports: import json
  import logging
  from tabpy.tabpy_server.management.util import write_state_config
  from threading import Lock
  from time import time
label_desc: Use image node_id 13 for calling the TabPyState obj's underlying member method code with example usage: obj.update_endpoint(name, description, docstring, endpoint_type, version, methods, target, dependencies, schema) without return types