code: def check_min_max_scaling(
      X: Tensor,
      strict: bool = False,
      atol: float = 1e-2,
      raise_on_fail: bool = False,
      ignore_dims: Optional[List[int]] = None,
  ) -> None:
      r"""Check that tensor is normalized to the unit cube.
  
      Args:
          X: A `batch_shape x n x d` input tensor. Typically the training inputs
              of a model.
          strict: If True, require `X` to be scaled to the unit cube (rather than
              just to be contained within the unit cube).
          atol: The tolerance for the boundary check. Only used if `strict=True`.
          raise_on_fail: If True, raise an exception instead of a warning.
          ignore_dims: Subset of dimensions where the min-max scaling check is omitted.
      """
      ignore_dims = ignore_dims or []
      check_dims = list(set(range(X.shape[-1])) - set(ignore_dims))
      if len(check_dims) == 0:
          return None
  
      with torch.no_grad():
          X_check = X[..., check_dims]
          Xmin = torch.min(X_check, dim=-1).values
          Xmax = torch.max(X_check, dim=-1).values
          msg = None
          if (
              strict
              and max(torch.abs(Xmin).max(), torch.abs(Xmax - 1).max())
              > atol
          ):
              msg = "scaled"
          if torch.any(Xmin < -atol) or torch.any(Xmax > 1 + atol):
              msg = "contained"
          if msg is not None:
              msg = (
                  f"Input data is not {msg} to the unit cube. "
                  "Please consider min-max scaling the input data."
              )
              if raise_on_fail:
                  raise InputDataError(msg)
              warnings.warn(msg, InputDataWarning)
  
imports: from __future__ import annotations
  import warnings
  from contextlib import contextmanager, ExitStack
  from typing import Iterator, List, Optional, Tuple
  import torch
  from botorch import settings
  from botorch.exceptions import InputDataError, InputDataWarning
  from botorch.settings import _Flag
  from gpytorch import settings
  from gpytorch.module import Module
  from torch import Tensor
label_desc: Use image node_id 5 for calling a global function with example usage: check_min_max_scaling(X, strict, atol, raise_on_fail, ignore_dims) and returns: None