code: def sbmv(k, alpha, a, x, beta, y, lower=False):
      """Computes y = alpha*A @ x + beta * y"""
      dtype = a.dtype.char
      if dtype == "f":
          func = cublas.ssbmv
      elif dtype == "d":
          func = cublas.dsbmv
      else:
          raise TypeError("Complex dtypes not supported")
  
      assert a.ndim == 2
      assert x.ndim == y.ndim == 1
      assert a.dtype == x.dtype == y.dtype
      m, n = a.shape
      assert x.shape[0] == n
      assert y.shape[0] == n
  
      if not a._f_contiguous:
          a = a.copy(order="F")
  
      alpha, alpha_ptr = _get_scalar_ptr(alpha, a.dtype)
      beta, beta_ptr = _get_scalar_ptr(beta, a.dtype)
      handle = device.get_cublas_handle()
      orig_mode = cublas.getPointerMode(handle)
      if isinstance(alpha, cupy.ndarray) or isinstance(
          beta, cupy.ndarray
      ):
          if not isinstance(alpha, cupy.ndarray):
              alpha = cupy.array(alpha)
              alpha_ptr = alpha.data.ptr
          if not isinstance(beta, cupy.ndarray):
              beta = cupy.array(beta)
              beta_ptr = beta.data.ptr
          cublas.setPointerMode(
              handle, cublas.CUBLAS_POINTER_MODE_DEVICE
          )
      else:
          cublas.setPointerMode(handle, cublas.CUBLAS_POINTER_MODE_HOST)
  
      if lower:
          uplo = cublas.CUBLAS_FILL_MODE_LOWER
      else:
          uplo = cublas.CUBLAS_FILL_MODE_UPPER
  
      handle = device.get_cublas_handle()
      try:
          func(
              handle,
              uplo,
              n,
              k,
              alpha_ptr,
              a.data.ptr,
              m,
              x.data.ptr,
              1,
              beta_ptr,
              y.data.ptr,
              1,
          )
      finally:
          cublas.setPointerMode(handle, orig_mode)
  
      return y
  
imports: import numpy
  from numpy import linalg
  import warnings
  import cupy
  from cupy import _core
  from cupy_backends.cuda.libs import cublas
  from cupy.cuda import device
  from cupy.linalg import _util
label_desc: Use image node_id 22 for calling a global function with example usage: sbmv(k, alpha, a, x, beta, y, lower) and returns: y