code: def _check_hypercube(x: Tensor, name: str) -> None:
      """Raises a `ValueError` if an element `x` is not in [0, 1].
  
      Args:
          x: Tensor to be checked.
          name: Name of the Tensor for the error message.
      """
      if (x < 0).any() or (x > 1).any():
          raise ValueError(name + " is not in hypercube [0, 1]^d.")
  
imports: import math
  from typing import List, Optional, Tuple
  import numpy
  import torch
  from botorch.exceptions.errors import UnsupportedError
  from gpytorch.constraints import Interval, Positive
  from gpytorch.kernels import Kernel
  from torch import nn, Tensor
label_desc: Use image node_id 2 for calling a global function with example usage: _check_hypercube(x, name) without return types