parameters: (request:HttpRequest, project_id=None, node_type:Optional[str]=None, node_id=None)
return_statement: return JsonResponse([link.class_instance.name for link in qs], safe=False)
docstring: List all labels (front-end node *tags*) attached to a particular node.
  
      ---
      parameters:
      - name: project_id
        description: Project containing node of interest
        required: true
      - name: node_type
        description: Either 'connector', 'treenode' or 'location'
        required: true
      - name: node_id
        description: ID of node to list labels for
        required: true
      type:
      - type: array
        items:
          type: string
        description: Labels used on a particular node
        required: true
docstring_summary: List all labels (front-end node *tags*) attached to a particular node.
docstring_tokens: List all labels ( front - end node * tags * ) attached to a particular node .
function: def labels_for_node(request:HttpRequest, project_id=None, node_type:Optional[str]=None, node_id=None) -> JsonResponse:
      """List all labels (front-end node *tags*) attached to a particular node.
  
      ---
      parameters:
      - name: project_id
        description: Project containing node of interest
        required: true
      - name: node_type
        description: Either 'connector', 'treenode' or 'location'
        required: true
      - name: node_id
        description: ID of node to list labels for
        required: true
      type:
      - type: array
        items:
          type: string
        description: Labels used on a particular node
        required: true
      """
      if node_type == 'treenode':
          qs = TreenodeClassInstance.objects.filter(
              relation__relation_name='labeled_as',
              class_instance__class_column__class_name='label',
              treenode=node_id,
              project=project_id).select_related('class_instance')
      elif node_type == 'location' or node_type == 'connector':
          qs = ConnectorClassInstance.objects.filter(
              relation__relation_name='labeled_as',
              class_instance__class_column__class_name='label',
              connector=node_id,
              project=project_id).select_related('class_instance')
      else:
          raise Http404(f'Unknown node type: "{node_type}"')
  
      return JsonResponse([link.class_instance.name for link in qs], safe=False)
function_tokens: def labels_for_node ( request : HttpRequest , project_id = None , node_type : Optional [ str ] = None , node_id = None ) -> JsonResponse : if node_type == 'treenode' : qs = TreenodeClassInstance . objects . filter ( relation__relation_name = 'labeled_as' , class_instance__class_column__class_name = 'label' , treenode = node_id , project = project_id ) . select_related ( 'class_instance' ) elif node_type == 'location' or node_type == 'connector' : qs = ConnectorClassInstance . objects . filter ( relation__relation_name = 'labeled_as' , class_instance__class_column__class_name = 'label' , connector = node_id , project = project_id ) . select_related ( 'class_instance' ) else : raise Http404 ( f'Unknown node type: "{node_type}"' ) return JsonResponse ( [ link . class_instance . name for link in qs ] , safe = False )