def METHOD_NAME(self, node: Any, text: str, last_end: int = 0) -> List[str]:
    new_chunks = []
    current_chunk = ""
    for child in node.children:
        if child.end_byte - child.start_byte > self.max_chars:
            # Child is too big, recursively chunk the child
            if len(current_chunk) > 0:
                new_chunks.append(current_chunk)
            current_chunk = ""
            new_chunks.extend(self.METHOD_NAME(child, text, last_end))
        elif (
            len(current_chunk) + child.end_byte - child.start_byte > self.max_chars
        ):
            # Child would make the current chunk too big, so start a new chunk
            new_chunks.append(current_chunk)
            current_chunk = text[last_end : child.end_byte]
        else:
            current_chunk += text[last_end : child.end_byte]
        last_end = child.end_byte
    if len(current_chunk) > 0:
        new_chunks.append(current_chunk)
    return new_chunks