code: def is_known_scalar(value):
      """
      Return True if value is a type we expect in a dataframe
      """
  
      def _is_datetime_or_timedelta(value):
          # Using pandas.Series helps catch python, numpy and pandas
          # versions of these types
          return pd.Series(value).dtype.kind in ("M", "m")
  
      return not np.iterable(value) and (
          isinstance(value, numbers.Number)
          or _is_datetime_or_timedelta(value)
      )
  
file_path: plotnine/plotnine/mapping/evaluation.py
imports: from __future__ import annotations
  import numbers
  import typing
  import numpy
  import pandas
  import pandas.api.types
  from ..exceptions import PlotnineError
label_desc: Use image node_id 5 for calling a global function with example usage: is_known_scalar(value) and returns: unknown, unknown