code: def is_dimension(value: object) -> TypeGuard[AnyDimension]:
      """
      Test whether the given value could be a valid dimension.
      (For usage in an assertion. It's not guaranteed in case of a callable.)
      """
      if value is None:
          return True
      if callable(value):
          return True  # Assume it's a callable that doesn't take arguments.
      if isinstance(value, (int, Dimension)):
          return True
      return False
  
file_path: catboost/contrib/python/prompt-toolkit/py3/prompt_toolkit/layout/dimension.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any, Callable, Union
label_desc: Use image node_id 4 for calling a global function with example usage: is_dimension(value) and returns: False, True, True, True