code: def scalar(data, dtype=None, gpu=None):
      try:
          arr = np.array(data, dtype=dtype)
          op = Scalar(arr, dtype=arr.dtype, gpu=gpu)
          shape = ()
          return op(shape)
      except ValueError:
          raise TypeError(f"Expect scalar, got: {data}")
  
file_path: mars/mars/tensor/datasource/scalar.py
imports: import numpy
  from ...None import opcodes
  from ...serialization.serializables import AnyField
  from .core import TensorNoInput
  from ..array_utils import create_array
label_desc: Use image node_id 1 for calling a global function with example usage: scalar(data, dtype, gpu) and returns: op