code: def _check_not_tuple_of_2_elements(obj: Any, obj_name: str) -> None:
      """Check object is not tuple or does not have 2 elements."""
      if not isinstance(obj, tuple) or len(obj) != 2:
          raise TypeError(f"{obj_name} must be a tuple of 2 elements.")
  
file_path: LightGBM/python-package/lightgbm/plotting.py
imports: import math
  from copy import deepcopy
  from io import BytesIO
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  from .basic import Booster, _data_from_pandas, _is_zero, _log_warning, _MissingType
  from .compat import GRAPHVIZ_INSTALLED, MATPLOTLIB_INSTALLED, pd_DataFrame
  from .sklearn import LGBMModel
label_desc: Use image node_id 1 for calling a global function with example usage: _check_not_tuple_of_2_elements(obj, obj_name) without return types