You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: document_symbol.rs
    path of file: ./repos/kcl/kclvm/tools/src/LSP/src
    
    the code of the file until where you have to start completion: use std::path::Path;

use kclvm_ast::MAIN_PKG;
use kclvm_error::Position;
use kclvm_sema::core::global_state::GlobalState;
use kclvm_sema::core::symbol::KCLSymbol;
use kclvm_sema::core::symbol::SymbolKind as KCLSymbolKind;
use lsp_types::Range;
use lsp_types::{DocumentSymbol, DocumentSymbolResponse, SymbolKind};

use crate::to_lsp::lsp_pos;

pub(crate) fn document_symbol(
    file: &str,
    gs: &GlobalState,
) -> Option<lsp_types::DocumentSymbolResponse> {
    let mut document_symbols: Vec<DocumentSymbol> = vec![];

    let dummy_pos = Position {
        filename: file.to_string(),
        line: 1,
        column: Some(0),
    };
    if let Some(scope) = gs.g
    
    fn document_symbol_test() {
        let (file, _, _, _, gs) = compile_test_file("src/test_data/document_symbol.k");

        let mut res = document_symbol(file.as_str(), &gs).unwrap();
        let mut expect = vec![];
        expect.push(build_document_symbol(
            "Person4",
            SymbolKind::STRUCT,
            ((0, 7), (0, 14)),
            Some(vec![build_document_symbol(
                "name",
                SymbolKind::PROPERTY,
                ((1, 4), (1, 8)),
                None,
                Some("str".to_string()),
            )]),
            Some("Person4".to_string()),
        ));
        expect.push(build_document_symbol(
            "p",
            SymbolKind::VARIABLE,
            ((3, 0), (3, 1)),
            None,
            Some("Person4".to_string()),
        ));

        match &mut res {
            DocumentSymbolResponse::Flat(_) => panic!("test failed"),
            DocumentSymbolResponse::Nested(got) => {
                got.sort_by(|a, b| a.name.cmp(&b.name));
                assert_eq!(got, &expect)
            }
        }
    }