code: def tensor(math_engine, shape, dtype="float32"):
      """Creates a blob of the specified shape.
  
      :param neoml.MathEngine.MathEngine math_engine: the math engine that works with this blob.
  
      :param shape: the target blob dimensions.
      :type shape: array of int
  
      :param dtype: the type of data in the blob.
      :type dtype: str, {"float32", "int32"}, default="float32"
      """
      if dtype != "float32" and dtype != "int32":
          raise ValueError(
              "The `dtype` must be one of {`float32`, `int32`}."
          )
  
      shape = np.array(shape, dtype=np.int32, copy=False)
  
      if shape.size != 7:
          raise ValueError("The `shape.size` must be == 7.")
  
      if np.any(shape <= 0):
          raise ValueError("All `shape` elements must be > 0.")
  
      return Blob(
          PythonWrapper.tensor(math_engine._internal, shape, dtype)
      )
  
imports: import neoml
  import neoml.PythonWrapper
  import neoml.MathEngine
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: tensor(math_engine, shape, dtype) and returns: Blob