def get_shared_code_chunker(chunk_size_limit: int):
    """Get or create a shared code chunker."""
    global _shared_code_chunker
    if _shared_code_chunker is None or _shared_code_chunker.chunk_size != chunk_size_limit:
        _shared_code_chunker = CodeChunker(
            tokenizer_or_token_counter=count_tokens,
            chunk_size=chunk_size_limit,
        )
    return _shared_code_chunker
Get or create a shared code chunker.
backend/airweave/platform/transformers/code_file_chunker.py