code: def execute(cls, ctx, op):
      chunk = op.outputs[0]
      (x,), device_id, xp = as_same_device(
          [ctx[c.key] for c in op.inputs],
          device=op.device,
          ret_extra=True,
      )
  
      with device(device_id):
          if op.sparse:
              ctx[chunk.key] = x.astype(op.dtype)
          else:
              if xp is np:
                  ctx[chunk.key] = x.astype(
                      op.dtype, order=op.order, casting=op.casting
                  )
              else:  # pragma: no cover
                  # cupy does not support casting
                  ctx[chunk.key] = x.astype(op.dtype, order=op.order)
  
file_path: mars/mars/tensor/base/astype.py
imports: import numpy
  from ...None import opcodes
  from ...serialization.serializables import KeyField, StringField
  from ...utils import get_dtype
  from ..array_utils import as_same_device, device
  from ..operands import TensorHasInput, TensorOperandMixin
  from ..utils import get_order
label_desc: Use image node_id 7 for calling the TensorAstype obj's underlying member method code with example usage: obj.execute(cls, ctx, op) without return types