code: def _adjacent_cols(
      df: DataFrame, cols: Iterable[str], min_max: dict[str, Any]
  ) -> bool:
      """Indicate if the given columns are all adjacent to one another."""
      idxs = sorted(df.get_column_index(col) for col in cols)
      if idxs != sorted(range(min(idxs), max(idxs) + 1)):
          return False
      else:
          columns = df.columns
          min_max["min"] = {"idx": idxs[0], "name": columns[idxs[0]]}
          min_max["max"] = {"idx": idxs[-1], "name": columns[idxs[-1]]}
          return True
  
imports: from __future__ import annotations
  from io import BytesIO
  from pathlib import Path
  from typing import TYPE_CHECKING, Any, Iterable, Sequence, overload
  from polars import functions
  from polars.datatypes import FLOAT_DTYPES, INTEGER_DTYPES, Date, Datetime, Float64, List, Object, Struct, Time
  from polars.dependencies import json
  from polars.exceptions import DuplicateError
  from polars.selectors import _expand_selector_dicts, _expand_selectors
label_desc: Use image node_id 2 for calling a global function with example usage: _adjacent_cols(df, cols, min_max) and returns: False, True