langchain/llms/anthropic.py/Anthropic/get_num_tokens
class Anthropic:    def get_num_tokens(self, text: str) -> int:
        """Calculate number of tokens."""
        if not self.count_tokens:
            raise NameError("Please ensure the anthropic package is loaded")
        return self.count_tokens(text)