code: def _is_termination_msg_mathchat(message):
      """Check if a message is a termination message."""
      if isinstance(message, dict):
          message = message.get("content")
          if message is None:
              return False
      cb = extract_code(message)
      contain_code = False
      for c in cb:
          if c[0] == "python" or c[0] == "wolfram":
              contain_code = True
              break
      return (
          not contain_code
          and get_answer(message) is not None
          and get_answer(message) != ""
      )
  
imports: import re
  import os
  from pydantic import BaseModel, Extra, root_validator
  from typing import Any, Callable, Dict, List, Optional, Union, Tuple
  from time import sleep
  from autogen._pydantic import PYDANTIC_V1
  from autogen.agentchat import Agent, UserProxyAgent
  from autogen.code_utils import UNKNOWN, extract_code, execute_code, infer_lang
  from autogen.math_utils import get_answer
label_desc: Use image node_id 1 for calling a global function with example usage: _is_termination_msg_mathchat(message) and returns: unknown, False