code: def block_diag(values, like=None):
      """Combine a sequence of 2D tensors to form a block diagonal tensor.
  
      Args:
          values (Sequence[tensor_like]): Sequence of 2D arrays/tensors to form
              the block diagonal tensor.
  
      Returns:
          tensor_like: the block diagonal tensor
  
      **Example**
  
      >>> t = [
      ...     np.array([[1, 2], [3, 4]]),
      ...     torch.tensor([[1, 2, 3], [-1, -6, -3]]),
      ...     torch.tensor(5)
      ... ]
      >>> qml.math.block_diag(t)
      tensor([[ 1,  2,  0,  0,  0,  0],
              [ 3,  4,  0,  0,  0,  0],
              [ 0,  0,  1,  2,  3,  0],
              [ 0,  0, -1, -6, -3,  0],
              [ 0,  0,  0,  0,  0,  5]])
      """
      values = np.coerce(values, like=like)
      return np.block_diag(values, like=like)
  
imports: import functools
  from collections.abc import Sequence
  import autoray
  import numpy
  from autograd.numpy.numpy_boxes import ArrayBox
  from autoray import numpy
  from numpy import ndarray
  from .None import single_dispatch
  from .utils import cast, cast_like, get_interface, requires_grad
label_desc: Use image node_id 5 for calling a global function with example usage: block_diag(values, like) and returns: np