code: def _check_strict_input(
      inputs: Iterable[Tensor],
      t_inputs: List[Tensor],
      target_or_inputs: str,
  ):
      for input_, t_input in zip(inputs, t_inputs or (None,)):
          for attr in {"shape", "dtype", "device"}:
              expected_attr = getattr(t_input, attr, None)
              found_attr = getattr(input_, attr, None)
              if expected_attr != found_attr:
                  msg = (
                      "Cannot modify {attr} of {t_or_i} "
                      "(expected {e_attr}, found {f_attr})."
                  )
                  msg = msg.format(
                      attr=attr,
                      e_attr=expected_attr,
                      f_attr=found_attr,
                      t_or_i=target_or_inputs,
                  )
                  raise RuntimeError(msg)
  
imports: from __future__ import annotations
  import warnings
  from copy import deepcopy
  from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
  import numpy
  import torch
  from botorch.acquisition.objective import PosteriorTransform
  from botorch.exceptions import UnsupportedError
  from botorch.exceptions.warnings import _get_single_precision_warning, InputDataWarning
  from botorch.models.likelihoods.pairwise import PairwiseLikelihood, PairwiseProbitLikelihood
  from botorch.models.model import FantasizeMixin, Model
  from botorch.models.transforms.input import InputTransform
  from botorch.models.utils.assorted import consolidate_duplicates
  from botorch.posteriors.gpytorch import GPyTorchPosterior
  from botorch.posteriors.posterior import Posterior
  from gpytorch import settings
  from gpytorch.constraints import GreaterThan, Interval
  from gpytorch.distributions.multivariate_normal import MultivariateNormal
  from gpytorch.kernels.rbf_kernel import RBFKernel
  from gpytorch.kernels.scale_kernel import ScaleKernel
  from gpytorch.means.constant_mean import ConstantMean
  from gpytorch.mlls import MarginalLogLikelihood
  from gpytorch.models.gp import GP
  from gpytorch.priors.smoothed_box_prior import SmoothedBoxPrior
  from gpytorch.priors.torch_priors import GammaPrior
  from linear_operator.operators import LinearOperator, RootLinearOperator
  from linear_operator.utils.cholesky import psd_safe_cholesky
  from linear_operator.utils.errors import NotPSDError
  from scipy import optimize
  from torch import float32, float64, Tensor
  from torch.nn.modules.module import _IncompatibleKeys
label_desc: Use image node_id 1 for calling a global function with example usage: _check_strict_input(inputs, t_inputs, target_or_inputs) without return types