def by_department_template_id(self,department_template_id: str) -> DepartmentTemplateItemRequestBuilder:
        """
        Provides operations to manage the departments property of the microsoft.graph.security.labelsRoot entity.
        param department_template_id: The unique identifier of departmentTemplate
        Returns: DepartmentTemplateItemRequestBuilder
        """
        if department_template_id is None:
            raise TypeError("department_template_id cannot be null.")
        from .item.department_template_item_request_builder import DepartmentTemplateItemRequestBuilder

        url_tpl_params = get_path_parameters(self.path_parameters)
        url_tpl_params["departmentTemplate%2Did"] = department_template_id
        return DepartmentTemplateItemRequestBuilder(self.request_adapter, url_tpl_params)

        Provides operations to manage the departments property of the microsoft.graph.security.labelsRoot entity.
        param department_template_id: The unique identifier of departmentTemplate
        Returns: DepartmentTemplateItemRequestBuilder
        
msgraph/generated/security/labels/departments/departments_request_builder.py